From 90b6409cb9a0191e159a525d4abe9194da70b8e4 Mon Sep 17 00:00:00 2001 From: Rohan Date: Fri, 1 Aug 2014 19:51:12 +0530 Subject: [PATCH] SpecialMovepage: Correctly apply target namespace to subpages Previously, moving a page from a subject namespace to a talk namespace (or vice-versa), resulted in the subpages being moved to the new page name, but still in the old namespace. Bug: T44024 Change-Id: Iefc5b495e777840dc6a2fe1226b8869d807f2d94 --- includes/specials/SpecialMovepage.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index bd80beca8b..cac324ac00 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -698,7 +698,10 @@ class MovePageForm extends UnlistedSpecialPage { $oldSubpage->getDBkey() ); - if ( $oldSubpage->isTalkPage() ) { + if ( $oldSubpage->isSubpage() && ( $ot->isTalkPage() xor $nt->isTalkPage() ) ) { + // Moving a subpage from a subject namespace to a talk namespace or vice-versa + $newNs = $nt->getNamespace(); + } elseif ( $oldSubpage->isTalkPage() ) { $newNs = $nt->getTalkPage()->getNamespace(); } else { $newNs = $nt->getSubjectPage()->getNamespace(); -- 2.20.1