From eb015354f188b7d3697d40b95659bfe2e79d2fe2 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sat, 9 Aug 2003 16:43:45 +0000 Subject: [PATCH] Movet get_download out of the website root, as it is not supported to access this directly. Download mirror selections are supported via the /get/$filename/from/a/mirror URLs --- error.php | 4 ++-- get_download.php => include/get-download.inc | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) rename get_download.php => include/get-download.inc (72%) diff --git a/error.php b/error.php index 9f6787d63..b8457a0be 100644 --- a/error.php +++ b/error.php @@ -104,7 +104,7 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) { // Mirror selection page if ($dlinfo[2] == "a") { - include_once $_SERVER['DOCUMENT_ROOT'] . "/get_download.php"; + include_once $_SERVER['DOCUMENT_ROOT'] . "/include/get-download.inc"; exit; } @@ -115,7 +115,7 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) { else { $mr = "http://{$dlinfo[2]}/"; } // Start the download process - include "do-download.inc"; + include $_SERVER['DOCUMENT_ROOT'] . "/include/do-download.inc"; download_file($mr, $df); exit; } diff --git a/get_download.php b/include/get-download.inc similarity index 72% rename from get_download.php rename to include/get-download.inc index 731f08526..773f0d9d4 100644 --- a/get_download.php +++ b/include/get-download.inc @@ -1,17 +1,17 @@ Choose mirror site for download

-You have chosen to download the following file: + You have chosen to download the following file:

-
+
' . $df . '
'; +echo '' . $df . '
'; // Try to get filesize to display $size = @filesize($local_file);