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 @@
476
476
return null;
477
477
}
478
478
479
+ if ( User::isIP( $name ) ) {
480
+ # Cannot exist
481
+ return null;
482
+ }
483
+
479
484
if ( isset( self::$idCacheByName[$name] ) ) {
480
485
return self::$idCacheByName[$name];
481
486
}
Follow-up revisions
Revision
Commit summary
Author
Date
r113755
Reverted
r113177
per CR
aaron
20: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
20:09, 13 March 2012
Aaron Schulz
(
talk
|
contribs
)
changed the
status
of r113177
[
removed:
fixme
added:
reverted]
20:55, 6 March 2012
Aaron Schulz
(
talk
|
contribs
)
changed the
status
of r113177
[
removed:
new
added:
fixme]