1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

#356 - Dowloads issue 'File not found'. Replaced $DOWNLOADS_DIRECTORY with e_DOWNLOAD.

This commit is contained in:
Moc
2013-05-30 11:17:57 +02:00
parent adafda5a8b
commit 72d9855d2c

View File

@@ -18,9 +18,9 @@ if (!is_numeric(e_QUERY))
header("location: ".e_QUERY); header("location: ".e_QUERY);
exit(); exit();
} }
elseif(file_exists($DOWNLOADS_DIRECTORY.e_QUERY)) // 1 - should we allow this? elseif(file_exists(e_DOWNLOAD.e_QUERY)) // 1 - should we allow this?
{ {
e107::getFile()->send($DOWNLOADS_DIRECTORY.e_QUERY); e107::getFile()->send(e_DOWNLOAD.e_QUERY);
exit(); exit();
} }
} }
@@ -96,9 +96,9 @@ if (preg_match("#.*\.[a-z,A-Z]{3,4}#", e_QUERY))
exit(); exit();
} }
} }
if (file_exists($DOWNLOADS_DIRECTORY.e_QUERY)) if (file_exists(e_DOWNLOAD.e_QUERY))
{ {
e107::getFile()->send($DOWNLOADS_DIRECTORY.e_QUERY); e107::getFile()->send(e_DOWNLOAD.e_QUERY);
exit(); exit();
} }
require_once(HEADERF); require_once(HEADERF);
@@ -195,9 +195,9 @@ if ($type == "file")
} }
else else
{ {
if (file_exists($DOWNLOADS_DIRECTORY.$download_url)) if (file_exists(e_DOWNLOAD.$download_url))
{ {
e107::getFile()->send($DOWNLOADS_DIRECTORY.$download_url); e107::getFile()->send(e_DOWNLOAD.$download_url);
exit(); exit();
} }
elseif(file_exists(e_UPLOAD.$download_url)) elseif(file_exists(e_UPLOAD.$download_url))