* (bug 20797) Fixed check for double moving the base page when also moving subpages...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 25 Sep 2009 15:29:32 +0000 (15:29 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 25 Sep 2009 15:29:32 +0000 (15:29 +0000)
includes/specials/SpecialMovepage.php

index e973ff5..6ee29cc 100644 (file)
@@ -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;
                        }