1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 13:11:52 +02:00

Merge pull request #3261 from SimSync/fix_2930

Fixes #2930 Added errormessage if request fails
This commit is contained in:
Cameron 2018-07-10 12:29:16 -07:00 committed by GitHub
commit 91d76fdc22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -115,6 +115,7 @@ define("LAN_FILES","Files");
define("LAN_SIZE", "Size");
define("LAN_VERSION", "Version");
define("LAN_DOWNLOAD", "Download");
define("LAN_DOWNLOAD_NO_PERMISSION", "File not found or you have no permission to download this file!");
define("LAN_WEBSITE", "Website");
define("LAN_COMMENTS", "Comments");
define("LAN_LOCATION", "Location");

View File

@ -53,7 +53,14 @@ if(!empty($_GET['file'])) // eg. request.php?file=1
$row = $sql->fetch();
// $file = $tp->replaceConstants($row['media_url'],'rel');
e107::getFile()->send($row['media_url']);
}
}
else
{
require_once(HEADERF);
echo e107::getMessage()->addError(LAN_DOWNLOAD_NO_PERMISSION)->render();
require_once(FOOTERF);
}
}
elseif(e107::isInstalled('download')) //BC Legacy Support. (Downloads Plugin)
{