From 1317ce730b3153cf466f6d71b59a82ab1da2a98d Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 18 Aug 2009 20:28:26 +0000 Subject: [PATCH] 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. --- includes/Title.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.20.1