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

From: Date: Sat, 21 Dec 2002 14:30:53 +0000
Subject: cvs: php-master-web /fetch mirrors.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14387@lists.php.net to get a copy of this message
goba Sat Dec 21 09:30:53 2002 EDT Modified files: /php-master-web/fetch mirrors.php Log: AAAAARRRGHHH! I am stupid. Index: php-master-web/fetch/mirrors.php diff -u php-master-web/fetch/mirrors.php:1.11 php-master-web/fetch/mirrors.php:1.12 --- php-master-web/fetch/mirrors.php:1.11 Sat Dec 21 09:04:23 2002 +++ php-master-web/fetch/mirrors.php Sat Dec 21 09:30:53 2002 @@ -55,10 +55,8 @@ // Go through all result rows while ($row = @mysql_fetch_array($res)) { - // Prepend http:// to hostname, if it is not there - if (!strstr("http:", $row["hostname"])) { - $row["hostname"] = "http://$row[hostname]/"; - } + // Prepend http:// to hostname + $row["hostname"] = "http://$row[hostname]/"; // Rewrite the mirrortype to use defined constants switch ($row['mirrortype']) { @@ -90,7 +88,7 @@ // 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"; + ",$row[mirrortype],$row[has_search],\"$row[lang]\",$status),\n"; } echo ' 0 => array("xx", "Unknown", FALSE, "/", MIRROR_SPECIAL, FALSE, "en", MIRROR_OK)', "\n"; echo ");\n";

« previous php.mirrors (#14387) next »