jenkins-bot has submitted this change and it was merged.

Change subject: Short circuit $wgSquidServersNoPurge iteration if ip is 
specifically listed. Quicker!
......................................................................


Short circuit $wgSquidServersNoPurge iteration if ip is specifically
listed. Quicker!

Follows up I49e34bdf13e8e8c6cd169c362c283fe1034bdc6d

Change-Id: Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a
---
M includes/ProxyTools.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Hashar: Looks good to me, approved
  Faidon Liambotis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/ProxyTools.php b/includes/ProxyTools.php
index 4efd347..ae7e953 100644
--- a/includes/ProxyTools.php
+++ b/includes/ProxyTools.php
@@ -82,7 +82,8 @@
        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

-- 
To view, visit https://gerrit.wikimedia.org/r/95163
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Faidon Liambotis <fai...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Ori.livneh <o...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to