cvs: phpweb / get_download.php /include layout.inc

From: Date: Sun, 09 Feb 2003 10:56:17 +0000
Subject: cvs: phpweb / get_download.php /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15612@lists.php.net to get a copy of this message
goba Sun Feb 9 05:56:17 2003 EDT Modified files: /phpweb get_download.php /phpweb/include layout.inc Log: Go with new better looking URLs which are also ok for IE... http://php.net/get/{filename}/from/a/mirror => opens the mirror selection page http://php.net/get/{filename}/from/this/mirror => download from this mirror http://php.net/get/{filename}/from/{mirrorname}/mirror => download from {mirrorname} mirror This is wget friendly. and avoids the extension on the end of the URL, which made some IEs and download managers go mad to think that a HTML page is actually an exe or a zip file... The URLs are also good to read out :) Index: phpweb/get_download.php diff -u phpweb/get_download.php:1.11 phpweb/get_download.php:1.12 --- phpweb/get_download.php:1.11 Wed Feb 5 15:43:19 2003 +++ phpweb/get_download.php Sun Feb 9 05:56:16 2003 @@ -74,18 +74,21 @@ echo '</tr>' . "\n"; } + // We print out a line for the current mirror + $thismirror = ($MYSITE == $murl); + // Highlight this mirror if it is the current one - echo '<tr bgcolor="' . ($MYSITE == $murl ? '#ffffcc' : '#e0e0e0') . '">' . "\n"; + echo '<tr bgcolor="' . ($thismirror ? '#ffffcc' : '#e0e0e0') . '">' . "\n"; // Print out caret (in bold if current mirror) echo '<td bgcolor="#ffffff" align="right">'; - print_image( ($MYSITE == $murl ? 'caret-r.gif' : 'caret-rg.gif') ); + print_image( ($thismirror ? 'caret-r.gif' : 'caret-rg.gif') ); echo '<br /></td>' . "\n"; // Print out mirror site download link echo '<td><small>'; - $mirrorname = substr($murl, strpos($murl, '//') + 2, -1); - print_link("/get/$df/from/$mirrorname", $mirrorname); + $mirrorname = ($thismirror ? "this" : substr($murl, strpos($murl, '//') + 2, -1)); + print_link("/get/$df/from/$mirrorname/mirror", $mirrorname); echo '</small><br /></td>' . "\n"; // Print out mirror provider's name Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.120 phpweb/include/layout.inc:1.121 --- phpweb/include/layout.inc:1.120 Fri Feb 7 10:17:21 2003 +++ phpweb/include/layout.inc Sun Feb 9 05:56:17 2003 @@ -1,6 +1,6 @@ <?php -/* $Id: layout.inc,v 1.120 2003/02/07 15:17:21 goba Exp $ */ +/* $Id: layout.inc,v 1.121 2003/02/09 10:56:17 goba Exp $ */ // Print an image for a sized spacer function spacer($width = 1, $height = 1, $return = false, $align = false, $extras = false) @@ -154,7 +154,7 @@ function download_link($file, $title, $showsize = true, $mirror = '') { - $download_link = "get/$file/from/mirror"; + $download_link = "get/$file/from/a/mirror"; if ($mirror != '') { $download_link = $mirror . $download_link; } else {

« previous php.mirrors (#15612) next »