r41304 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41303‎ | r41304 | r41305 >
Date:11:20, 27 September 2008
Author:aaron
Status:old
Tags:
Comment:
Let invalid usernames be renamed (bug 12654)
Modified paths:
  • /trunk/extensions/Renameuser/SpecialRenameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php
@@ -45,7 +45,7 @@
4646 }
4747
4848 $showBlockLog = $wgRequest->getBool( 'submit-showBlockLog' );
49 - $oldusername = Title::newFromText( $wgRequest->getText( 'oldusername' ), NS_USER );
 49+ $oldusername = Title::makeTitle( NS_USER, $wgRequest->getText( 'oldusername' ) );
5050 // Force uppercase of newusername otherweise wikis with wgCapitalLinks=false can create lc usernames
5151 $newusername = Title::newFromText( $wgContLang->ucfirst( $wgRequest->getText( 'newusername' ) ), NS_USER );
5252 $oun = is_object( $oldusername ) ? $oldusername->getText() : '';
@@ -162,7 +162,6 @@
163163 $wgOut->addWikiText( "<div class=\"errorbox\">" . wfMsg( 'renameuser-error-request' ) . "</div>" );
164164 return;
165165 } elseif( !is_object( $oldusername ) ) {
166 - // FIXME: This is bogus. Invalid titles need to be rename-able! (bug 12654)
167166 $wgOut->addWikiText(
168167 "<div class=\"errorbox\">"
169168 . wfMsg( 'renameusererrorinvalid', $wgRequest->getText( 'oldusername' ) )

Follow-up revisions

RevisionCommit summaryAuthorDate
r41328Remove validation step that removes prefix if validation is off (for bug 12654)aaron01:41, 28 September 2008