mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fixes #2930 Added errormessage if request fails
This commit is contained in:
@@ -115,6 +115,7 @@ define("LAN_FILES","Files");
|
|||||||
define("LAN_SIZE", "Size");
|
define("LAN_SIZE", "Size");
|
||||||
define("LAN_VERSION", "Version");
|
define("LAN_VERSION", "Version");
|
||||||
define("LAN_DOWNLOAD", "Download");
|
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_WEBSITE", "Website");
|
||||||
define("LAN_COMMENTS", "Comments");
|
define("LAN_COMMENTS", "Comments");
|
||||||
define("LAN_LOCATION", "Location");
|
define("LAN_LOCATION", "Location");
|
||||||
|
@@ -53,7 +53,14 @@ if(!empty($_GET['file'])) // eg. request.php?file=1
|
|||||||
$row = $sql->fetch();
|
$row = $sql->fetch();
|
||||||
// $file = $tp->replaceConstants($row['media_url'],'rel');
|
// $file = $tp->replaceConstants($row['media_url'],'rel');
|
||||||
e107::getFile()->send($row['media_url']);
|
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)
|
elseif(e107::isInstalled('download')) //BC Legacy Support. (Downloads Plugin)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user