don't insert task if feature is disabled even though they are not run but might be irritating for the admin, thx to fuchsi

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-03-29 20:10:37 +01:00
parent 93f320ed6d
commit ab410cc91e
7 changed files with 68 additions and 104 deletions

View File

@@ -37,6 +37,14 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '
|| $type == '5'
|| $type == '10')
{
// 4 = bind -> if bind disabled -> no task
if ($type == '4' && $settings['system']['bind_enable'] == '0') {
return;
}
// 10 = quota -> if quota disabled -> no task
if ($type == '10' && $settings['system']['diskquota_enabled'] == '0') {
return;
}
$db->query('DELETE FROM `' . TABLE_PANEL_TASKS . '` WHERE `type`="' . $type . '"');
$db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`) VALUES ("' . $type . '")');
}