https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114448

Revision: 114448
Author:   daniel
Date:     2012-03-23 15:18:44 +0000 (Fri, 23 Mar 2012)
Log Message:
-----------
use content-based diff

Modified Paths:
--------------
    branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php

Modified: branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php
===================================================================
--- branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php 2012-03-23 
15:18:20 UTC (rev 114447)
+++ branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php 2012-03-23 
15:18:44 UTC (rev 114448)
@@ -503,11 +503,13 @@
                                $vals['diff'] = array();
                                $context = new DerivativeContext( 
$this->getContext() );
                                $context->setTitle( $title );
+                $handler = ContentHandler::getForTitle( $title );
+
                                if ( !is_null( $this->difftotext ) ) {
-                                       $engine = new DifferenceEngine( 
$context );
-                                       $engine->setText( $text, 
$this->difftotext );
+                                       $engine = 
$handler->getDifferenceEngine( $context );
+                                       $engine->setText( $text, 
$this->difftotext ); #FIXME: use content object!
                                } else {
-                                       $engine = new DifferenceEngine( 
$context, $revision->getID(), $this->diffto );
+                                       $engine = 
$handler->getDifferenceEngine( $context, $revision->getID(), $this->diffto );
                                        $vals['diff']['from'] = 
$engine->getOldid();
                                        $vals['diff']['to'] = 
$engine->getNewid();
                                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to