cvs: php-master-web /fetch mirrors.php

From: Date: Thu, 01 May 2003 12:02:46 +0000
Subject: cvs: php-master-web /fetch mirrors.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-17178@lists.php.net to get a copy of this message
goba Thu May 1 08:02:46 2003 EDT Modified files: /php-master-web/fetch mirrors.php Log: Fix mirror type rewrite to work Remove ending ?> from generated code for header() safety reasons Reformat output for better human readability Index: php-master-web/fetch/mirrors.php diff -u php-master-web/fetch/mirrors.php:1.19 php-master-web/fetch/mirrors.php:1.20 --- php-master-web/fetch/mirrors.php:1.19 Mon Jan 6 06:02:37 2003 +++ php-master-web/fetch/mirrors.php Thu May 1 08:02:45 2003 @@ -71,7 +71,7 @@ $row["hostname"] = "http://$row[hostname]/"; // Rewrite the mirrortype to use defined constants - switch ($row['mirrortype']) { + switch (intval($row['mirrortype'])) { case MIRROR_DOWNLOAD : $row['mirrortype'] = 'MIRROR_DOWNLOAD'; break; case MIRROR_STANDARD : $row['mirrortype'] = 'MIRROR_STANDARD'; break; case MIRROR_SPECIAL : $row['mirrortype'] = 'MIRROR_SPECIAL'; break; @@ -91,12 +91,12 @@ elseif (!$row["current"]) { $status = 'MIRROR_OUTDATED'; } // Print out the array element for this mirror - echo " \"$row[hostname]\" => array(\"$row[cc]\"," . - "\"$row[providername]\",$row[has_stats],\"$row[providerurl]\"" . - ",$row[mirrortype],$row[has_search],\"$row[lang]\",$status),\n"; + echo " \"$row[hostname]\" => array(\n" . + " \"$row[cc]\", \"$row[providername]\", $row[has_stats],\n" . + " \"$row[providerurl]\", $row[mirrortype], $row[has_search],\n" . + " \"$row[lang]\", $status),\n"; } echo ");\n"; - echo "?>\n"; } } }

« previous php.mirrors (#17178) next »