Short circuit $wgSquidServersNoPurge iteration if ip is specifically
authorReedy <reedy@wikimedia.org>
Wed, 13 Nov 2013 14:51:25 +0000 (14:51 +0000)
committerReedy <reedy@wikimedia.org>
Wed, 13 Nov 2013 14:51:25 +0000 (14:51 +0000)
listed. Quicker!

Follows up I49e34bdf13e8e8c6cd169c362c283fe1034bdc6d

Change-Id: Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a

includes/ProxyTools.php

index 4efd347..ae7e953 100644 (file)
@@ -82,7 +82,8 @@ function wfIsConfiguredProxy( $ip ) {
        global $wgSquidServers, $wgSquidServersNoPurge;
 
        // quick check of known proxy servers
-       $trusted = in_array( $ip, $wgSquidServers );
+       $trusted = in_array( $ip, $wgSquidServers )
+               || in_array( $ip, $wgSquidServersNoPurge );
 
        if ( !$trusted ) {
                // slightly slower check to see if the ip is listed directly or in a CIDR