From 42b9964e9cba827f84b6ec79fd03ea3110b9f68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabr=C3=ADcio=20Zimmerer=20Murta?= Date: Mon, 18 Jun 2012 02:05:55 -0300 Subject: [PATCH] Fix 'task id 9' issue. Adds a message on Admin's Overview page if a task is of an unknown type. Removes task '9' adding on function.inserttask and ignores task id 9 on CronJobFunctions. --- admin_settings.php | 2 -- lib/functions/froxlor/function.CronjobFunctions.php | 5 +++++ lib/functions/froxlor/function.inserttask.php | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin_settings.php b/admin_settings.php index c21d3212..aef515c5 100644 --- a/admin_settings.php +++ b/admin_settings.php @@ -83,7 +83,6 @@ if(($page == 'settings' || $page == 'overview') $log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles due to changed setting"); inserttask('1'); inserttask('5'); - inserttask('9'); # Using nameserver, insert a task which rebuilds the server config if ($settings['system']['bind_enable']) @@ -129,7 +128,6 @@ elseif($page == 'rebuildconfigs' $log->logAction(ADM_ACTION, LOG_INFO, "rebuild configfiles"); inserttask('1'); inserttask('5'); - inserttask('9'); inserttask('10'); # Using nameserver, insert a task which rebuilds the server config diff --git a/lib/functions/froxlor/function.CronjobFunctions.php b/lib/functions/froxlor/function.CronjobFunctions.php index 04aee62a..2ef4063e 100644 --- a/lib/functions/froxlor/function.CronjobFunctions.php +++ b/lib/functions/froxlor/function.CronjobFunctions.php @@ -216,6 +216,11 @@ function getOutstandingTasks() { $task_desc = $lng['tasks']['diskspace_set_quota']; } + else + { + $task_desc = "ERROR: Unknown task type '".$row['type']. + "'"; + } if($task_desc != '') { $tasks .= '
  • '.$task_desc.'
  • '; diff --git a/lib/functions/froxlor/function.inserttask.php b/lib/functions/froxlor/function.inserttask.php index 91b9c8f5..279ac4e8 100644 --- a/lib/functions/froxlor/function.inserttask.php +++ b/lib/functions/froxlor/function.inserttask.php @@ -35,7 +35,6 @@ function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = ' || $type == '3' || $type == '4' || $type == '5' - || $type == '9' || $type == '10') { $db->query('DELETE FROM `' . TABLE_PANEL_TASKS . '` WHERE `type`="' . $type . '"');