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
$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();