From: Alexandre Emsenhuber Date: Fri, 25 Sep 2009 15:29:32 +0000 (+0000) Subject: * (bug 20797) Fixed check for double moving the base page when also moving subpages... X-Git-Tag: 1.31.0-rc.0~39532 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=5f99b27f974cc48143b2bc19e5d7d6e9ad830289;p=lhc%2Fweb%2Fwiklou.git * (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 --- 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; }