From: Roan Kattouw Date: Tue, 18 Aug 2009 20:28:26 +0000 (+0000) Subject: Untested equivalent of r55262 ("When moving a page to a subpage of itself, don't... X-Git-Tag: 1.31.0-rc.0~40238 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=1317ce730b3153cf466f6d71b59a82ab1da2a98d;p=lhc%2Fweb%2Fwiklou.git Untested equivalent of r55262 ("When moving a page to a subpage of itself, don't move the root page twice") for Title::moveSubpages(). SpecialMovepage should be refactored to use Title::moveSubpages() some day. --- diff --git a/includes/Title.php b/includes/Title.php index e6ff7a6e8a..5b5c06f525 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3074,7 +3074,11 @@ class Title { break; } - if( $oldSubpage->getArticleId() == $this->getArticleId() ) + // We don't know whether this function was called before + // or after moving the root page, so check both + // $this and $nt + if( $oldSubpage->getArticleId() == $this->getArticleId() || + $oldSubpage->getArticleID() == $nt->getArticleId() ) // When moving a page to a subpage of itself, // don't move it twice continue;