MediaWiki r42756 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r42755‎ | r42756 (on ViewVC)‎ | r42757 >
Date:01:36, 29 October 2008
Author:brion
Status:old
Tags:
Comment:
Roll back part of r41435 and following "* Add option to reserve old name (bug 15181)"
We got complaints about it being enabled by default (recently switched off), but it's pretty nasty anyway:
* no logging occurs!
* sets a random password instead of null password
* no way to recover the account within the system should it be done by accident
Modified paths:

Diff [purge]

Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php
===================================================================
--- trunk/extensions/Renameuser/SpecialRenameuser_body.php	(revision 42755)
+++ trunk/extensions/Renameuser/SpecialRenameuser_body.php	(revision 42756)
@@ -54,17 +54,10 @@
 		// If nothing given for these flags, assume they are checked
 		// unless this is a POST submission.
 		$move_checked = true;
-		$reserve_checked = false;
 		if( $wgRequest->wasPosted() ) {
 			if( !$wgRequest->getCheck( 'movepages' ) ) {
 				$move_checked = false;
 			}
-			if( !$wgRequest->getCheck( 'reservename' ) ) {
-				$reserve_checked = false;
-			}
-			else {
-				$reserve_checked = true;
-			}
 		}
 		$warnings = array();
 		if( $oun && $nun && !$wgRequest->getCheck( 'confirmaction' )  ) {
@@ -114,16 +107,6 @@
 				</tr>"
 			);
 		}
-		$wgOut->addHTML( "
-			<tr>
-				<td>&nbsp;
-				</td>
-				<td class='mw-input'>" .
-					Xml::checkLabel( wfMsg( 'renameuserreserve' ), 'reservename', 'reservename', 
-						$reserve_checked, array( 'tabindex' => '5' ) ) .
-				"</td>
-			</tr>"
-		);
 		if( $warnings ) {
 			$warningsHtml = array();
 			foreach( $warnings as $warning )
@@ -292,13 +275,6 @@
 		$log->addEntry( 'renameuser', $oldusername, wfMsgExt( 'renameuser-log', array( 'parsemag', 'content' ), 
 			$wgContLang->formatNum( $contribs ), $reason ), $newusername->getText() );
 
-		// Reserve the old name with a random password
-		if( $wgRequest->getCheck( 'reservename' ) ) {
-			$p = User::randomPassword();
-			$user = User::createNew( $olduser->getName() );
-			$user->setNewpassword( $p );
-		}
-
 		// Move any user pages
 		if( $wgRequest->getCheck( 'movepages' ) && $wgUser->isAllowed( 'move' ) ) {
 			$dbr = wfGetDB( DB_SLAVE );

Status & tagging log

  • 15:36, 12 September 2011 Meno25 (Talk | contribs) changed the status of r42756 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox