r56920 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56919‎ | r56920 | r56921 >
Date:15:29, 25 September 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 20797) Fixed check for double moving the base page when also moving subpages, now uses $ot->equals() rather than the ID of the old page, since this was checking it against the ID of the newly created redirect and thus never catched the double move
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -357,9 +357,7 @@
358358 $createRedirect = true;
359359 }
360360
361 - # Do the actual move. First remember the old ID for later reference,
362 - # so that we don't get the ID of the redirect.
363 - $oldId = $ot->getArticleId();
 361+ # Do the actual move.
364362 $error = $ot->moveTo( $nt, true, $this->reason, $createRedirect );
365363 if ( $error !== true ) {
366364 # FIXME: show all the errors in a list, not just the first one
@@ -453,7 +451,7 @@
454452 $skin = $wgUser->getSkin();
455453 $count = 1;
456454 foreach( $extraPages as $oldSubpage ) {
457 - if( $oldSubpage->getArticleId() == $oldId ) {
 455+ if( $ot->equals( $oldSubpage ) ) {
458456 # Already did this one.
459457 continue;
460458 }

Status & tagging log