r113177 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113176‎ | r113177 | r113178 >
Date:20:52, 6 March 2012
Author:ialex
Status:reverted (Comments)
Tags:
Comment:
No need to do a database query when passing an IP address to User::idFromName()
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -475,6 +475,11 @@
476476 return null;
477477 }
478478
 479+ if ( User::isIP( $name ) ) {
 480+ # Cannot exist
 481+ return null;
 482+ }
 483+
479484 if ( isset( self::$idCacheByName[$name] ) ) {
480485 return self::$idCacheByName[$name];
481486 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r113755Reverted r113177 per CRaaron20:09, 13 March 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   20:55, 6 March 2012

What about pre-existing users with bad names. This likely breaks things like sp:contribs.

Status & tagging log