1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

Fixes #2930 Added errormessage if request fails

This commit is contained in:
Achim Ennenbach 2018-07-09 19:16:25 +02:00
parent cf2fe0ed31
commit a976d7dacc
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)
{