cvs: phpweb / my.php
[email protected] ("Hannes Magnusson")
| Newsgroups | php.webmaster |
|---|---|
| Message-ID | <cvsbjori1203892139@cvsserver> |
bjori Sun Feb 24 22:28:59 2008 UTC
Modified files:
/phpweb my.php
Log:
Add "Unknown" country for unofficial mirrors and fix E_NOTICE
http://cvs.php.net/viewvc.cgi/phpweb/my.php?r1=1.34&r2=1.35&diff_format=u
Index: phpweb/my.php
diff -u phpweb/my.php:1.34 phpweb/my.php:1.35
--- phpweb/my.php:1.34 Fri Oct 26 16:51:34 2007
+++ phpweb/my.php Sun Feb 24 22:28:59 2008
@@ -1,5 +1,5 @@
<?php
-// $Id: my.php,v 1.34 2007/10/26 16:51:34 bjori Exp $
+// $Id: my.php,v 1.35 2008/02/24 22:28:59 bjori Exp $
$_SERVER['BASE_PAGE'] = 'my.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
@@ -248,8 +248,16 @@
$murl == "http://www.php.net/") { continue; }
// Compute user friendly mirror name
- $mname = ($murl == "NONE" ? "Automatic selection (default)" :
- $COUNTRIES[$mdata[0]] . " (" .substr($murl, strpos($murl, '//') + 2, -1)). ")";
+ if ($murl == "NONE") {
+ $mname = "Automatic selection (default)";
+ } else {
+ $tmpurl = " (" .substr($murl, strpos($murl, '//') + 2, -1). ")";
+ if (isset($COUNTRIES[$mdata[0]])) {
+ $mname = $COUNTRIES[$mdata[0]] . $tmpurl;
+ } else {
+ $mname = "Unknown" . $tmpurl;
+ }
+ }
// Print out mirror option with selection if needed
printf (