cvs: php-master-web /fetch mirrors.php
| From: | Gabor Hojtsy | Date: | Sun, 22 Dec 2002 21:53:33 +0000 |
| Subject: | cvs: php-master-web /fetch mirrors.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14445@lists.php.net to get a copy of this message | ||
goba Sun Dec 22 16:53:33 2002 EDT
Modified files:
/php-master-web/fetch mirrors.php
Log:
- Now, special mirrors have the uptodate check, so
there is no need to mark them as OK.
- Removed the BC part of marking disfunctional
mirrors as special. This is not needed anymore.
- Reordered mirror status checks, so if a mirror is
not up, but is uptodate (at the last check),
then it will show up as MIRROR_DOESNOTWORK
Index: php-master-web/fetch/mirrors.php
diff -u php-master-web/fetch/mirrors.php:1.15 php-master-web/fetch/mirrors.php:1.16
--- php-master-web/fetch/mirrors.php:1.15 Sun Dec 22 08:16:30 2002
+++ php-master-web/fetch/mirrors.php Sun Dec 22 16:53:33 2002
@@ -73,23 +73,11 @@
// Presumably the mirror is all right
$status = 'MIRROR_OK';
- // Non-special mirrors have an uptodate check
- if ($row['mirrortype'] != 'MIRROR_SPECIAL') {
-
- // Set inactive mirrors to special (for backward compatibilty),
- // and provide status information computed from current information
- if (!$row["active"]) {
- $row["mirrortype"] = 'MIRROR_SPECIAL';
- $status = 'MIRROR_NOTACTIVE';
- } elseif (!$row["current"]) {
- $row["mirrortype"] = 'MIRROR_SPECIAL';
- $status = 'MIRROR_OUTDATED';
- } elseif (!$row["up"]) {
- $row["mirrortype"] = 'MIRROR_SPECIAL';
- $status = 'MIRROR_DOESNOTWORK';
- }
-
- }
+ // Provide status information for mirrors
+ // computed from current mirror details
+ if (!$row["active"]) { $status = 'MIRROR_NOTACTIVE'; }
+ elseif (!$row["up"]) { $status = 'MIRROR_DOESNOTWORK'; }
+ elseif (!$row["current"]) { $status = 'MIRROR_OUTDATED'; }
// Print out the array element for this mirror
echo " \"$row[hostname]\" =>
array(\"$row[cc]\"," .