r114448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114447‎ | r114448 | r114449 >
Date:15:18, 23 March 2012
Author:daniel
Status:deferred (Comments)
Tags:
Comment:
use content-based diff
Modified paths:
  • /branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php (modified) (history)

Diff [purge]

Index: branches/Wikidata/phase3/includes/api/ApiQueryRevisions.php
@@ -503,11 +503,13 @@
504504 $vals['diff'] = array();
505505 $context = new DerivativeContext( $this->getContext() );
506506 $context->setTitle( $title );
 507+ $handler = ContentHandler::getForTitle( $title );
 508+
507509 if ( !is_null( $this->difftotext ) ) {
508 - $engine = new DifferenceEngine( $context );
509 - $engine->setText( $text, $this->difftotext );
 510+ $engine = $handler->getDifferenceEngine( $context );
 511+ $engine->setText( $text, $this->difftotext ); #FIXME: use content object!
510512 } else {
511 - $engine = new DifferenceEngine( $context, $revision->getID(), $this->diffto );
 513+ $engine = $handler->getDifferenceEngine( $context, $revision->getID(), $this->diffto );
512514 $vals['diff']['from'] = $engine->getOldid();
513515 $vals['diff']['to'] = $engine->getNewid();
514516 }

Comments

#Comment by Platonides (talk | contribs)   17:54, 4 April 2012

Speces instead of tabs

Status & tagging log