From: Reedy Date: Wed, 13 Nov 2013 14:51:25 +0000 (+0000) Subject: Short circuit $wgSquidServersNoPurge iteration if ip is specifically X-Git-Tag: 1.31.0-rc.0~18169 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=b89355c27035be293f6b28d32239fe8879b7e46c;p=lhc%2Fweb%2Fwiklou.git Short circuit $wgSquidServersNoPurge iteration if ip is specifically listed. Quicker! Follows up I49e34bdf13e8e8c6cd169c362c283fe1034bdc6d Change-Id: Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a --- diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php index 4efd3473f7..ae7e9531f4 100644 --- a/includes/ProxyTools.php +++ b/includes/ProxyTools.php @@ -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