cvs: phpweb /include do-download.inc get-download.inc
| From: | Gabor Hojtsy | Date: | Fri, 27 Aug 2004 20:33:31 +0000 |
| Subject: | cvs: phpweb /include do-download.inc get-download.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25986@lists.php.net to get a copy of this message | ||
goba Fri Aug 27 16:33:31 2004 EDT
Modified files:
/phpweb/include do-download.inc get-download.inc
Log:
link to the mirror list, and not the download mirror selector, since if the file is not available,
the download mirror selector will also emit an error. so fit this download mirror selector too, to
inform the user
http://cvs.php.net/diff.php/phpweb/include/do-download.inc?r1=1.7&r2=1.8&ty=u
Index: phpweb/include/do-download.inc
diff -u phpweb/include/do-download.inc:1.7 phpweb/include/do-download.inc:1.8
--- phpweb/include/do-download.inc:1.7 Fri Aug 27 15:59:11 2004
+++ phpweb/include/do-download.inc Fri Aug 27 16:33:31 2004
@@ -1,6 +1,6 @@
<?php
-// $Id: do-download.inc,v 1.7 2004/08/27 19:59:11 goba Exp $
+// $Id: do-download.inc,v 1.8 2004/08/27 20:33:31 goba Exp $
/*
This code redirects the user to the exact file to
@@ -39,7 +39,7 @@
$info = "<p>
This mirror site is improperly setup, and thus has
no copy of the executable file you requested. Please
- <a href=\"/get/$file/from/a/mirror\">select a different
+ <a href=\"/mirrors\">select a different
mirror site</a> to get the file, until this site gets
fixed.
</p>";
http://cvs.php.net/diff.php/phpweb/include/get-download.inc?r1=1.3&r2=1.4&ty=u
Index: phpweb/include/get-download.inc
diff -u phpweb/include/get-download.inc:1.3 phpweb/include/get-download.inc:1.4
--- phpweb/include/get-download.inc:1.3 Sun Sep 7 04:30:43 2003
+++ phpweb/include/get-download.inc Fri Aug 27 16:33:31 2004
@@ -1,5 +1,5 @@
<?php
-// $Id: get-download.inc,v 1.3 2003/09/07 08:30:43 goba Exp $
+// $Id: get-download.inc,v 1.4 2004/08/27 20:33:31 goba Exp $
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/mirrortable.inc';
// Try to make this page non-cached
@@ -25,16 +25,30 @@
// No downloadable file found
if ($file === FALSE) {
site_header("Download not found");
+
+ // An executable was requested (temp fix for rsync change)
+ if (preg_match("!\\.exe$!", $name)) {
+ $info = "<p>
+ This mirror site is improperly setup, and thus has
+ no copy of the executable file you requested. Please
+ <a href=\"/mirrors\">select a different mirror site</a>
+ to get the file, until this site gets fixed.
+</p>";
+ }
+ else {
+ $info = "<p>
+ The file you requested (<strong>{$df}</strong>) is not found on
+ this server (<strong>{$MYSITE}</strong>). If this file is a
+ recent addition to our downloads, then it is possible that this
+ particular server is not yet updated to host that file for download.
+ Please come back to this server later, or start the download from
+ another mirror site.
+</p>";
+ }
+
echo <<<EOT
<h1>Download not found</h1>
-<p>
- The file you requested (<strong>{$df}</strong>) is not found on
- this server (<strong>{$MYSITE}</strong>). If this file is a recent
- addition to our downloads, then it is possible that this particular
- server is not yet updated to host that file for download. Please
- come back to this server later, or start the download from another
- mirror site.
-</p>
+{$info}
EOT;
site_footer();
exit;