cvs: phpweb /include loadavg.inc

From: Date: Fri, 07 Jul 2006 13:15:04 +0000
Subject: cvs: phpweb /include loadavg.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-31944@lists.php.net to get a copy of this message
goba Fri Jul 7 13:15:04 2006 UTC Modified files: /phpweb/include loadavg.inc Log: only check for high load on the primary site, plus fix a small preference bug http://cvs.php.net/viewvc.cgi/phpweb/include/loadavg.inc?r1=1.12&r2=1.13&diff_format=u Index: phpweb/include/loadavg.inc diff -u phpweb/include/loadavg.inc:1.12 phpweb/include/loadavg.inc:1.13 --- phpweb/include/loadavg.inc:1.12 Sat Feb 18 05:44:33 2006 +++ phpweb/include/loadavg.inc Fri Jul 7 13:15:04 2006 @@ -1,13 +1,11 @@ <?php # vim:ft=php -// $Id: loadavg.inc,v 1.12 2006/02/18 05:44:33 rasmus Exp $ +// $Id: loadavg.inc,v 1.13 2006/07/07 13:15:04 goba Exp $ /* - Offload to the visitor's nearest mirror if the load is too high. The used sys_getloadavg() function is currently only available in the latest PHP 5.1 versions - */ // Check load on mirror @@ -16,7 +14,7 @@ global $COUNTRY, $MIRRORS; // We cannot check the load here - if (!function_exists("sys_getloadavg")) { + if (!function_exists("sys_getloadavg") || !is_primary_site()) { return; } @@ -31,7 +29,7 @@ // Adhere to user preferences if valid $user_mirror = myphpnet_mirror(); if (isset($MIRRORS[$user_mirror]) && $MIRRORS[$user_mirror][7] == MIRROR_OK - && $murl != "http://www.php.net/") { + && $user_mirror != "http://www.php.net/") { header("Location: $user_mirror" . substr($_SERVER['REQUEST_URI'], 1)); exit; }

« previous php.mirrors (#31944) next »