Lazy initialisation of wgProxyList
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 6 Dec 2005 13:29:07 +0000 (13:29 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 6 Dec 2005 13:29:07 +0000 (13:29 +0000)
includes/User.php

index 9e96e92..0b47fa8 100644 (file)
@@ -374,7 +374,7 @@ class User {
         *  master.
         */
        function getBlockedStatus( $bFromSlave = true ) {
-               global $wgProxyList, $wgEnableSorbs, $wgProxyWhitelist;
+               global $wgEnableSorbs, $wgProxyWhitelist;
 
                if ( -1 != $this->mBlockedby ) {
                        wfDebug( "User::getBlockedStatus: already loaded.\n" );
@@ -406,7 +406,7 @@ class User {
                if ( !$this->isSysop() && !in_array( $ip, $wgProxyWhitelist ) ) {
 
                        # Local list
-                       if ( array_key_exists( $ip, $wgProxyList ) ) {
+                       if ( wfIsLocallyBlockedProxy( $ip ) ) {
                                $this->mBlockedby = wfMsg( 'proxyblocker' );
                                $this->mBlockreason = wfMsg( 'proxyblockreason' );
                        }