cvs: phpweb /include do-download.inc

From: Date: Fri, 27 Aug 2004 19:59:12 +0000
Subject: cvs: phpweb /include do-download.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-25979@lists.php.net to get a copy of this message
goba Fri Aug 27 15:59:12 2004 EDT Modified files: /phpweb/include do-download.inc Log: intercept executable downloads, and inform users on a solution http://cvs.php.net/diff.php/phpweb/include/do-download.inc?r1=1.6&r2=1.7&ty=u Index: phpweb/include/do-download.inc diff -u phpweb/include/do-download.inc:1.6 phpweb/include/do-download.inc:1.7 --- phpweb/include/do-download.inc:1.6 Sun Mar 21 09:49:11 2004 +++ phpweb/include/do-download.inc Fri Aug 27 15:59:11 2004 @@ -1,6 +1,6 @@ <?php -// $Id: do-download.inc,v 1.6 2004/03/21 14:49:11 goba Exp $ +// $Id: do-download.inc,v 1.7 2004/08/27 19:59:11 goba Exp $ /* This code redirects the user to the exact file to @@ -34,15 +34,29 @@ $moreinfo = ", or <a href=\"{$_SERVER['HTTP_REFERER']}\">reconsider your mirror selection</a>"; } else { $moreinfo = ""; } - echo <<<EOT -<h1>Download not found</h1> -<p> + // 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=\"/get/$file/from/a/mirror\">select a different + mirror site</a> to get the file, until this site gets + fixed. +</p>"; + } + else { + $info = "<p> The file you requested (<strong>{$file}</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{$moreinfo}. -</p> +</p>"; + } + + echo <<<EOT +<h1>Download not found</h1> +{$info} EOT; site_footer(); exit;

« previous php.mirrors (#25979) next »