Index: trunk/phase3/includes/User.php |
— | — | @@ -836,15 +836,15 @@ |
837 | 837 | $this->mBlockedby = 0; |
838 | 838 | $ip = wfGetIP(); |
839 | 839 | |
840 | | - if ($this->isAllowed( 'ipblock-exempt' ) ) { |
841 | | - # Exempt from all types of IP-block |
842 | | - $ip = null; |
| 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 | 843 | } |
844 | 844 | |
845 | 845 | # User/IP blocking |
846 | 846 | $this->mBlock = new Block(); |
847 | 847 | $this->mBlock->fromMaster( !$bFromSlave ); |
848 | | - if ( $this->mBlock->load( $ip , $this->mId ) ) { |
| 848 | + if ( $this->mBlock->load( $check_ip , $this->mId ) ) { |
849 | 849 | wfDebug( __METHOD__.": Found block.\n" ); |
850 | 850 | $this->mBlockedby = $this->mBlock->mBy; |
851 | 851 | $this->mBlockreason = $this->mBlock->mReason; |
— | — | @@ -860,14 +860,14 @@ |
861 | 861 | if ( !$this->isAllowed('proxyunbannable') && !in_array( $ip, $wgProxyWhitelist ) ) { |
862 | 862 | |
863 | 863 | # Local list |
864 | | - if ( wfIsLocallyBlockedProxy( $ip ) ) { |
| 864 | + if ( wfIsLocallyBlockedProxy( $check_ip ) ) { |
865 | 865 | $this->mBlockedby = wfMsg( 'proxyblocker' ); |
866 | 866 | $this->mBlockreason = wfMsg( 'proxyblockreason' ); |
867 | 867 | } |
868 | 868 | |
869 | 869 | # DNSBL |
870 | 870 | if ( !$this->mBlockedby && $wgEnableSorbs && !$this->getID() ) { |
871 | | - if ( $this->inSorbsBlacklist( $ip ) ) { |
| 871 | + if ( $this->inSorbsBlacklist( $check_ip ) ) { |
872 | 872 | $this->mBlockedby = wfMsg( 'sorbs' ); |
873 | 873 | $this->mBlockreason = wfMsg( 'sorbsreason' ); |
874 | 874 | } |