http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82851
Revision: 82851
Author: ialex
Date: 2011-02-26 13:28:02 +0000 (Sat, 26 Feb 2011)
Log Message:
-----------
Don't even try to get user's IP address if he has 'ipblock-exempt' right
Modified Paths:
--------------
trunk/phase3/includes/User.php
Modified: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php 2011-02-26 13:15:34 UTC (rev 82850)
+++ trunk/phase3/includes/User.php 2011-02-26 13:28:02 UTC (rev 82851)
@@ -1116,7 +1116,10 @@
$this->mAllowUsertalk = 0;
# Check if we are looking at an IP or a logged-in user
- if ( $this->isIP( $this->getName() ) ) {
+ if ( $this->isAllowed( 'ipblock-exempt' ) ) {
+ # Exempt from all types of IP-block
+ $ip = '';
+ } elseif ( $this->isIP( $this->getName() ) ) {
$ip = $this->getName();
} else {
# Check if we are looking at the current user
@@ -1130,11 +1133,6 @@
}
}
- if ( $this->isAllowed( 'ipblock-exempt' ) ) {
- # Exempt from all types of IP-block
- $ip = '';
- }
-
# User/IP blocking
$this->mBlock = new Block();
$this->mBlock->fromMaster( !$bFromSlave );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs