Commit:    3d6bec7cf4f29a4f92271dede8dc37077bac447c
Author:    Daniel P. Brown <[email protected]>         Wed, 10 Oct 2012 18:16:58 
-0400
Parents:   64b4e805257856289ff0a419d6d352f6d371c788
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=3d6bec7cf4f29a4f92271dede8dc37077bac447c

Log:
Fixes bug where IP addresses are being displayed as duplicate links in 
/mirrors.php and /downloads.

Changed paths:
  M  include/mirrortable.inc


Diff:
diff --git a/include/mirrortable.inc b/include/mirrortable.inc
index c4f468e..babe5aa 100644
--- a/include/mirrortable.inc
+++ b/include/mirrortable.inc
@@ -73,9 +73,9 @@ function mirror_table($df = '', $cmatch = '', $cnomatch = '') 
{
     $MURLS = array_keys($MIRRORS);
     foreach ($MURLS as $murl) {
 
-        // If the mirror is not all right or it is virtual (not an official 
mirror), skip it
+        // If the mirror is not all right or it is virtual (not an official 
mirror), or if this is an IP, skip it
         if (mirror_status($murl) != MIRROR_OK ||
-            (!$cnf['virtual'] && mirror_type($murl) == MIRROR_VIRTUAL)) { 
continue; }
+            (!$cnf['virtual'] && mirror_type($murl) == MIRROR_VIRTUAL) || 
preg_match('/^\d/',$murl)) { continue; }
 
         // Get the country code and check if it is
         // matching the country provided (or does not


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to