cvs: phpweb / get_download.php mirrors.php
| From: | Gabor Hojtsy | Date: | Sun, 22 Dec 2002 13:19:32 +0000 |
| Subject: | cvs: phpweb / get_download.php mirrors.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14433@lists.php.net to get a copy of this message | ||
goba Sun Dec 22 08:19:32 2002 EDT
Modified files:
/phpweb mirrors.php get_download.php
Log:
Ignore VIRTUAL mirrors in the mirrors list (do not list
unofficial mirrors). But do not ignore VIRTUAL mirrors
in the get_download mirror list (allow downloads from
local unofficial mirrors, when the user is on that
particular mirror).
Index: phpweb/mirrors.php
diff -u phpweb/mirrors.php:1.15 phpweb/mirrors.php:1.16
--- phpweb/mirrors.php:1.15 Sat Dec 21 14:11:44 2002
+++ phpweb/mirrors.php Sun Dec 22 08:19:32 2002
@@ -47,8 +47,8 @@
$MURLS = array_keys($MIRRORS);
foreach ($MURLS as $murl) {
- // If the mirror is not all right, skip it
- if (mirror_status($murl) != MIRROR_OK) { continue; }
+ // If the mirror is not all right or it is virtual (not an official mirror), skip it
+ if (mirror_status($murl) != MIRROR_OK || mirror_type($murl) == MIRROR_VIRTUAL) { continue; }
// Print out table row, color it specially if current mirror
echo '<tr bgcolor="' . ($MYSITE == $murl ? '#ffffcc' :
'#e0e0e0') . '"><td>';
Index: phpweb/get_download.php
diff -u phpweb/get_download.php:1.3 phpweb/get_download.php:1.4
--- phpweb/get_download.php:1.3 Sat Dec 21 16:11:15 2002
+++ phpweb/get_download.php Sun Dec 22 08:19:32 2002
@@ -62,6 +62,8 @@
foreach ($MURLS as $murl) {
// If the mirror is not all right, skip it
+ // Virtual mirrors *are listed* here, because local unofficial
+ // mirrors can be used in this way for download.
if (mirror_status($murl) != MIRROR_OK) { continue; }
// Get country code, print out a