cvs: phpweb / downloads.php

From: Date: Fri, 09 Aug 2002 12:07:08 +0000
Subject: cvs: phpweb / downloads.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-11821@lists.php.net to get a copy of this message
sander Fri Aug 9 08:07:08 2002 EDT Modified files: /phpweb downloads.php Log: Don't bother the user with mirrors when he/she is already using one... Fixes #18830. Index: phpweb/downloads.php diff -u phpweb/downloads.php:1.125 phpweb/downloads.php:1.126 --- phpweb/downloads.php:1.125 Tue Jul 23 13:00:17 2002 +++ phpweb/downloads.php Fri Aug 9 08:07:08 2002 @@ -66,20 +66,25 @@ $cm = find_closest_mirrors(); $cmn = count($cm); if ($cmn > 0) { - echo "We found "; - echo ($cmn > 1 ? "$cmn mirrors" : "a mirror"); - echo " near you. We recommend that you use one of these.\n"; - echo " Please visit: "; - foreach ($cm as $num => $mirror) { - echo '<a href="' . $mirror . 'downloads.php">' . $mirror . '</a>'; - if ($num < $cmn-1) { echo " or "; } - } - echo ". You can also change mirrors at the bottom of this page."; - if ($server == "www.php.net" || $server == "php.net") { - $mirror = $cm[0]; - } else { - $mirror = "http://$server/"; - } + if(!in_array("http://$server/", $cm)) { + echo "We found "; + echo ($cmn > 1 ? "$cmn mirrors" : "a mirror"); + echo " near you. We recommend that you use one of these.\n"; + echo " Please visit: "; + foreach ($cm as $num => $mirror) { + echo '<a href="' . $mirror . 'downloads.php">' . $mirror . '</a>'; + if ($num < $cmn-1) { echo " or "; } + } + echo ". You can also change mirrors at the bottom of this page."; + if ($server == "www.php.net" || $server == "php.net") { + $mirror = $cm[0]; + } else { + $mirror = "http://$server/"; + } + } else { + echo "You can change mirrors at the bottom of the page."; + $mirror = ""; + } } else { echo "You can change mirrors at the bottom of the page."; srand ((double)microtime()*1000000);

« previous php.mirrors (#11821) next »