r35824 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35823‎ | r35824 | r35825 >
Date:21:57, 3 June 2008
Author:simetrical
Status:old
Tags:
Comment:
(bug 14385) "Move subpages" option no longer tries to move to invalid titles. Patch based on one by Mr.Z-man.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialMovepage.php
@@ -363,7 +363,14 @@
364364 );
365365 # The following line is an atrocious hack. Kill it with fire.
366366 $newNs = $nt->getNamespace() + ($oldPage->getNamespace() & 1);
367 - $newPage = Title::makeTitle( $newNs, $newPageName );
 367+ # Bug 14385: we need makeTitleSafe because the new page names may
 368+ # be longer than 255 characters.
 369+ $newPage = Title::makeTitleSafe( $newNs, $newPageName );
 370+ if( !$newPage ) {
 371+ $oldLink = $skin->makeKnownLinkObj( $oldPage );
 372+ $extraOutput []= wfMsgHtml( 'movepage-page-unmoved', $oldLink, Title::makeName( $newNs, $newPageName ) );
 373+ continue;
 374+ }
368375
369376 # This was copy-pasted from Renameuser, bleh.
370377 if ( $newPage->exists() && !$oldPage->isValidMoveTarget( $newPage ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -323,6 +323,7 @@
324324 * (bug 11659) Urldecode image names in galleries
325325 * (bug 14258, 14368) Fix for subpage renames in replication environments
326326 * (bug 14367) Failed block no longer adds phantom watchlist entry
 327+* (bug 14385) "Move subpages" option no longer tries to move to invalid titles
327328
328329
329330 === API changes in 1.13 ===

Status & tagging log