r35870 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35869‎ | r35870 | r35871 >
Date:17:55, 4 June 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 14386) Fix subpage namespace oddity when moving a talk page
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialMovepage.php
@@ -367,8 +367,11 @@
368368 $nt->getDBKey(),
369369 $oldPage->getDBKey()
370370 );
371 - # The following line is an atrocious hack. Kill it with fire.
372 - $newNs = $nt->getNamespace() + ($oldPage->getNamespace() & 1);
 371+ if( $oldPage->isTalkPage() ) {
 372+ $newNs = $nt->getTalkPage()->getNamespace();
 373+ } else {
 374+ $newNs = $nt->getSubjectPage()->getNamespace();
 375+ }
373376 # Bug 14385: we need makeTitleSafe because the new page names may
374377 # be longer than 255 characters.
375378 $newPage = Title::makeTitleSafe( $newNs, $newPageName );
Index: trunk/phase3/RELEASE-NOTES
@@ -326,6 +326,7 @@
327327 * (bug 14258, 14368) Fix for subpage renames in replication environments
328328 * (bug 14367) Failed block no longer adds phantom watchlist entry
329329 * (bug 14385) "Move subpages" option no longer tries to move to invalid titles
 330+* (bug 14386) Fix subpage namespace oddity when moving a talk page
330331
331332
332333 === API changes in 1.13 ===

Status & tagging log