mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Block file downloads when disabled
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
| e107 website system - Language File.
|
| e107 website system - Language File.
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_download.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_download.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2007-02-03 14:21:30 $
|
| $Date: 2008-07-04 20:23:12 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -96,6 +96,8 @@ define("LAN_dl_74", "Total downloads from this mirror: ");
|
|||||||
|
|
||||||
define("LAN_dl_75", "no image available ");
|
define("LAN_dl_75", "no image available ");
|
||||||
define("LAN_dl_76", "Go to page");
|
define("LAN_dl_76", "Go to page");
|
||||||
define("LAN_dl_77", "Downloads"); // Intentional duplicate - some languages need it to be different. This is for number of townloads
|
define("LAN_dl_77", "Downloads"); // Intentional duplicate - some languages need it to be different. This is for number of downloads
|
||||||
|
|
||||||
|
define('LAN_dl_78', 'That download has been disabled or discontinued. Please check in the --LINK--downloads</a> area for a more recent version.');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
18
request.php
18
request.php
@@ -12,8 +12,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/request.php,v $
|
| $Source: /cvs_backup/e107_0.8/request.php,v $
|
||||||
| $Revision: 1.4 $
|
| $Revision: 1.5 $
|
||||||
| $Date: 2007-10-28 22:19:16 $
|
| $Date: 2008-07-04 20:23:13 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -112,9 +112,19 @@ if (preg_match("#.*\.[a-z,A-Z]{3,4}#", e_QUERY)) {
|
|||||||
if ($type == "file")
|
if ($type == "file")
|
||||||
{
|
{
|
||||||
$qry = "SELECT d.*, dc.download_category_class FROM #download as d LEFT JOIN #download_category AS dc ON dc.download_category_id = d.download_category WHERE d.download_id = {$id}";
|
$qry = "SELECT d.*, dc.download_category_class FROM #download as d LEFT JOIN #download_category AS dc ON dc.download_category_id = d.download_category WHERE d.download_id = {$id}";
|
||||||
if ($sql->db_Select_gen($qry)) {
|
if ($sql->db_Select_gen($qry))
|
||||||
|
{
|
||||||
$row = $sql->db_Fetch();
|
$row = $sql->db_Fetch();
|
||||||
if (check_class($row['download_category_class']) && check_class($row['download_class'])) {
|
if (check_class($row['download_category_class']) && check_class($row['download_class']))
|
||||||
|
{
|
||||||
|
if ($row['download_active'] == 0)
|
||||||
|
{ // Inactive download - don't allow
|
||||||
|
require_once(HEADERF);
|
||||||
|
$ns -> tablerender(LAN_dl_61, "<div style='text-align:center'>".str_replace('--LINK--',"<a href='".e_HTTP.'download.php'."'>",LAN_dl_78).'</div>');
|
||||||
|
require_once(FOOTERF);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
if($pref['download_limits'] && $row['download_active'] == 1) {
|
if($pref['download_limits'] && $row['download_active'] == 1) {
|
||||||
check_download_limits();
|
check_download_limits();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user