From 5f99b27f974cc48143b2bc19e5d7d6e9ad830289 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 25 Sep 2009 15:29:32 +0000 Subject: [PATCH] * (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 --- includes/specials/SpecialMovepage.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index e973ff5d26..6ee29ccafe 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -357,9 +357,7 @@ class MovePageForm { $createRedirect = true; } - # Do the actual move. First remember the old ID for later reference, - # so that we don't get the ID of the redirect. - $oldId = $ot->getArticleId(); + # Do the actual move. $error = $ot->moveTo( $nt, true, $this->reason, $createRedirect ); if ( $error !== true ) { # FIXME: show all the errors in a list, not just the first one @@ -453,7 +451,7 @@ class MovePageForm { $skin = $wgUser->getSkin(); $count = 1; foreach( $extraPages as $oldSubpage ) { - if( $oldSubpage->getArticleId() == $oldId ) { + if( $ot->equals( $oldSubpage ) ) { # Already did this one. continue; } -- 2.20.1