com web/php: Arg, Fixed bug #66146 - mirror links wrong: include/site.inc

From: Date: Fri, 22 Nov 2013 17:21:50 +0000
Subject: com web/php: Arg, Fixed bug #66146 - mirror links wrong: include/site.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22451@lists.php.net to get a copy of this message
Commit: 3585750d6e05cab71534b19180efe43b49b63590 Author: Hannes Magnusson <bjori@mongodb.com> Fri, 22 Nov 2013 09:21:50 -0800 Parents: a2cf742a5d12d4ff30bae5ae2f6640aa78e38324 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=3585750d6e05cab71534b19180efe43b49b63590 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; ?>

« previous php.webmaster (#22451) next »