Index: trunk/phase3/includes/User.php |
— | — | @@ -836,15 +836,10 @@ |
837 | 837 | $this->mBlockedby = 0; |
838 | 838 | $ip = wfGetIP(); |
839 | 839 | |
840 | | - if (!$this->isAllowed( 'ipblock-exempt' ) ) { |
841 | | - # Check for IP blocks - ipblock-exempt is exempt from all types of IP block. |
842 | | - $check_ip = $ip; |
843 | | - } |
844 | | - |
845 | 840 | # User/IP blocking |
846 | 841 | $this->mBlock = new Block(); |
847 | 842 | $this->mBlock->fromMaster( !$bFromSlave ); |
848 | | - if ( $this->mBlock->load( $check_ip , $this->mId ) ) { |
| 843 | + if ( $this->mBlock->load( $ip , $this->mId ) ) { |
849 | 844 | wfDebug( __METHOD__.": Found block.\n" ); |
850 | 845 | $this->mBlockedby = $this->mBlock->mBy; |
851 | 846 | $this->mBlockreason = $this->mBlock->mReason; |
— | — | @@ -860,14 +855,14 @@ |
861 | 856 | if ( !$this->isAllowed('proxyunbannable') && !in_array( $ip, $wgProxyWhitelist ) ) { |
862 | 857 | |
863 | 858 | # Local list |
864 | | - if ( wfIsLocallyBlockedProxy( $check_ip ) ) { |
| 859 | + if ( wfIsLocallyBlockedProxy( $ip ) ) { |
865 | 860 | $this->mBlockedby = wfMsg( 'proxyblocker' ); |
866 | 861 | $this->mBlockreason = wfMsg( 'proxyblockreason' ); |
867 | 862 | } |
868 | 863 | |
869 | 864 | # DNSBL |
870 | 865 | if ( !$this->mBlockedby && $wgEnableSorbs && !$this->getID() ) { |
871 | | - if ( $this->inSorbsBlacklist( $check_ip ) ) { |
| 866 | + if ( $this->inSorbsBlacklist( $ip ) ) { |
872 | 867 | $this->mBlockedby = wfMsg( 'sorbs' ); |
873 | 868 | $this->mBlockreason = wfMsg( 'sorbsreason' ); |
874 | 869 | } |
Index: trunk/phase3/includes/Block.php |
— | — | @@ -126,6 +126,12 @@ |
127 | 127 | if ( $this->loadFromResult( $res, $killExpired ) ) { |
128 | 128 | return true; |
129 | 129 | } |
| 130 | + |
| 131 | + $userObject = User::newFromId($user); |
| 132 | + |
| 133 | + if ($userObject->isAllowed('ipblock-exempt') ) { |
| 134 | + $address = ''; |
| 135 | + } |
130 | 136 | } |
131 | 137 | |
132 | 138 | # Try IP block |