From: Gabriel Wicke Date: Thu, 26 Feb 2004 20:08:45 +0000 (+0000) Subject: enabled ports != 80 for purging, just add the :port in wgSquidServers X-Git-Tag: 1.3.0beta1~945 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22statistiques_visites%22%2C%22%22%29%20.%20%22?a=commitdiff_plain;h=1df646d3a401cb2e7f75048b14d4a923812d5d8b;p=lhc%2Fweb%2Fwiklou.git enabled ports != 80 for purging, just add the :port in wgSquidServers --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index e77cb554f5..60959b8c26 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -787,7 +787,9 @@ function wfPurgeSquidServers ($urlArr) { while ($so < $sockspersq && !$failed) { if ($so == 0) { /* first socket for this server, do the tests */ - $socket = @fsockopen($wgSquidServers[$ss], 80, $error, $errstr, 3); + list($server, $port) = explode(':', $wgSquidServers[$ss]); + if(!isset($port)) $port = 80; + $socket = @fsockopen($server, $port, $error, $errstr, 3); if (!$socket) { $failed = true; $totalsockets -= $sockspersq; @@ -808,7 +810,9 @@ function wfPurgeSquidServers ($urlArr) { } } else { /* open the remaining sockets for this server */ - $sockets[] = @fsockopen($wgSquidServers[$ss], 80, $error, $errstr, 2); + list($server, $port) = explode(':', $wgSquidServers[$ss]); + if(!isset($port)) $port = 80; + $sockets[] = @fsockopen($server, $port, $error, $errstr, 2); @stream_set_blocking($sockets[$s],false); } $so++;