From b89355c27035be293f6b28d32239fe8879b7e46c Mon Sep 17 00:00:00 2001 From: Reedy Date: Wed, 13 Nov 2013 14:51:25 +0000 Subject: [PATCH] Short circuit $wgSquidServersNoPurge iteration if ip is specifically listed. Quicker! Follows up I49e34bdf13e8e8c6cd169c362c283fe1034bdc6d Change-Id: Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a --- includes/ProxyTools.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.20.1