Commit:    3985d40e3db0e715451ae428a0a6b9b3baec4feb
Author:    Hannes Magnusson <[email protected]>         Fri, 22 Nov 2013 
09:21:50 -0800
Parents:   5eedd9f61cedba4761b06d20a3e6063a98c19c8a
Branches:  master

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

Log:
Arg, Fixed bug #66146 - mirror links wrong

Bugs:
https://bugs.php.net/66146

Changed paths:
  M  include/site.inc


Diff:
diff --git a/include/site.inc b/include/site.inc
index 95bf870..0bc1eeb 100644
--- a/include/site.inc
+++ b/include/site.inc
@@ -241,14 +241,15 @@ function print_mirror_box($countryname, $countrycode, 
$mirrors, $file = null, $d
             </div>
             <?php foreach($mirrors as $mirror): ?>
 <?php
-    $url = substr($mirror["url"], strpos($mirror["url"], '//') + 2, -1);
+    $url = $mirror["url"];
+    $urltitle = substr($url, strpos($url, '//') + 2, -1);
     if ($file) {
         $what = $direct_download ? "this" : "a";
         $url = $mirror["url"] . "get/$file/from/$what/mirror";
     }
 ?>
             <div class="entry">
-                <div class="url"><a href="<?php echo $url; ?>" title="<?php 
echo clean($mirror['url']); ?>"><?php echo clean($mirror['url']); ?></a></div>
+                <div class="url"><a href="<?php echo $url; ?>" title="<?php 
echo clean($mirror['url']); ?>"><?php echo clean($urltitle); ?></a></div>
                 <div class="provider"><a href="<?php echo 
$mirror['provider_url']; ?>" title="<?php echo 
clean($mirror['provider_title']); ?>"><?php echo 
clean($mirror['provider_title']); ?></a></div>
             </div>
             <?php endforeach; ?>


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

Reply via email to