1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 03:24:20 +02:00

Fixed #128: Download Plugin - can't activate "limits"; minor additional

cleanup
This commit is contained in:
SecretR
2013-04-27 14:45:47 +03:00
parent 1cefa38d66
commit 00ad4d35f5
2 changed files with 16 additions and 14 deletions

View File

@@ -44,14 +44,10 @@ require_once(e_HANDLER."userclass_class.php");
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
$pref = e107::getPref(); // legacy, remove all globals
$download = new download();
// $adminDownload = new adminDownload();
new plugin_download_admin();
require_once(e_ADMIN."auth.php");
/*
@@ -189,12 +185,16 @@ if (isset($_POST['addlimit']))
if (isset($_POST['updatelimits']))
{
if ($pref['download_limits'] != $_POST['download_limits'])
//if ($pref['download_limits'] != $_POST['download_limits'])
{
$pref['download_limits'] = ($_POST['download_limits'] == 'on') ? 1 : 0;
save_prefs();
$message .= DOWLAN_126."<br/>";
$tmp = ($_POST['download_limits'] == 'on') ? 1 : 0;
if ($pref['download_limits'] != $tmp)
{
$pref['download_limits'] = $tmp;
e107::getConfig()->set('download_limits', $tmp)->save(false);
$message .= DOWLAN_126."<br/>";
}
}
foreach(array_keys($_POST['count_num']) as $idLim)
{
@@ -228,7 +228,8 @@ if (isset($_POST['updatelimits']))
}
}
new plugin_download_admin();
require_once(e_ADMIN."auth.php");
//download/includes/admin.php is auto-loaded.
e107::getAdminUI()->runPage();
require_once(e_ADMIN."footer.php");