From: Brion Vibber Date: Wed, 4 Jun 2008 17:55:16 +0000 (+0000) Subject: * (bug 14386) Fix subpage namespace oddity when moving a talk page X-Git-Tag: 1.31.0-rc.0~47171 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=a1844e1869b304c8be6e95980127ffe07acae017;p=lhc%2Fweb%2Fwiklou.git * (bug 14386) Fix subpage namespace oddity when moving a talk page --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5ba98eb3ee..6b92d83312 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -326,6 +326,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14258, 14368) Fix for subpage renames in replication environments * (bug 14367) Failed block no longer adds phantom watchlist entry * (bug 14385) "Move subpages" option no longer tries to move to invalid titles +* (bug 14386) Fix subpage namespace oddity when moving a talk page === API changes in 1.13 === diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index 812b97cd67..d845370aed 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -367,8 +367,11 @@ class MovePageForm { $nt->getDBKey(), $oldPage->getDBKey() ); - # The following line is an atrocious hack. Kill it with fire. - $newNs = $nt->getNamespace() + ($oldPage->getNamespace() & 1); + if( $oldPage->isTalkPage() ) { + $newNs = $nt->getTalkPage()->getNamespace(); + } else { + $newNs = $nt->getSubjectPage()->getNamespace(); + } # Bug 14385: we need makeTitleSafe because the new page names may # be longer than 255 characters. $newPage = Title::makeTitleSafe( $newNs, $newPageName );