r9904 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9903‎ | r9904 | r9905 >
Date:19:01, 4 July 2005
Author:avar
Status:old
Tags:
Comment:
* Doing some cleanup on user input
Modified paths:
  • /trunk/extensions/Renameuser/SpecialRenameuser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/SpecialRenameuser.php
@@ -35,7 +35,7 @@
3636 }
3737
3838 function execute() {
39 - global $wgOut, $wgUser, $wgTitle, $wgRequest;
 39+ global $wgOut, $wgUser, $wgTitle, $wgRequest, $wgContLang;
4040 global $wgVersion, $wgMaxNameChars;
4141
4242 $this->setHeaders();
@@ -55,8 +55,8 @@
5656 return;
5757 }
5858
59 - $oldusername = trim( $wgRequest->getText( 'oldusername' ) );
60 - $newusername = strtr( trim( $wgRequest->getText( 'newusername' ) ), '_', ' ' );
 59+ $oldusername = $wgContLang->ucfirst( strtr( trim( $wgRequest->getText( 'oldusername' ) ), '_', ' ' ) );
 60+ $newusername = $wgContLang->ucfirst( strtr( trim( $wgRequest->getText( 'newusername' ) ), '_', ' ' ) );
6161
6262 $action = $wgTitle->escapeLocalUrl();
6363 $renameuserold = wfMsgHtml( 'renameuserold' );

Status & tagging log