r103774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103773‎ | r103774 | r103775 >
Date:18:59, 20 November 2011
Author:ialex
Status:ok
Tags:
Comment:
Use WikiPage instead of Article to call updateRevisionOn()
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -370,13 +370,13 @@
371371 }
372372 $mwRedir = MagicWord::get( 'redirect' );
373373 $redirectText = $mwRedir->getSynonym( 0 ) . ' [[' . $destTitle->getPrefixedText() . "]]\n";
374 - $redirectArticle = new Article( $targetTitle );
 374+ $redirectPage = WikiPage::factory( $targetTitle );
375375 $redirectRevision = new Revision( array(
376376 'page' => $this->mTargetID,
377377 'comment' => $comment,
378378 'text' => $redirectText ) );
379379 $redirectRevision->insertOn( $dbw );
380 - $redirectArticle->updateRevisionOn( $dbw, $redirectRevision );
 380+ $redirectPage->updateRevisionOn( $dbw, $redirectRevision );
381381
382382 # Now, we record the link from the redirect to the new title.
383383 # It should have no other outgoing links...

Status & tagging log