From 276245a39544dec1dad1f0040eace2b3e57de683 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 5 Apr 2018 08:54:08 +0200 Subject: [PATCH] do not show table of scheduler classes if none exists --- views/bootstrap/class.SchedulerTaskMgr.php | 68 +++++++++++----------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/views/bootstrap/class.SchedulerTaskMgr.php b/views/bootstrap/class.SchedulerTaskMgr.php index 345e6ed48..c68f55abf 100644 --- a/views/bootstrap/class.SchedulerTaskMgr.php +++ b/views/bootstrap/class.SchedulerTaskMgr.php @@ -263,42 +263,44 @@ $(document).ready( function() {
\n"; - print "\n\n"; - print "".getMLText('scheduler_class')."\n"; - print "".getMLText('scheduler_class_description')."\n"; - print "".getMLText('scheduler_class_parameter')."\n"; - print "\n"; - print "\n"; - $errmsgs = array(); - foreach($GLOBALS['SEEDDMS_SCHEDULER']['tasks'] as $extname=>$tasks) { - foreach($tasks as $taskname=>$task) { - echo ""; - echo ""; - echo $extname."::".$taskname; - echo ""; - echo ""; - echo $task->getDescription(); - echo ""; - echo ""; - $params = $task->getAdditionalParams(); - foreach($params as $param) - $k[] = $param['name']; - echo implode(', ', $k); - echo ""; - echo ""; - print "
"; - $t = $scheduler->getTasksByExtension($extname, $taskname); - if($t) { - print ""; + if(!empty($GLOBALS['SEEDDMS_SCHEDULER']['tasks'])) { + echo "\n"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + $errmsgs = array(); + foreach($GLOBALS['SEEDDMS_SCHEDULER']['tasks'] as $extname=>$tasks) { + foreach($tasks as $taskname=>$task) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; } - print ""; - print ""; - echo ""; - echo ""; } + echo "
".getMLText('scheduler_class')."".getMLText('scheduler_class_description')."".getMLText('scheduler_class_parameter')."
"; + echo $extname."::".$taskname; + echo ""; + echo $task->getDescription(); + echo ""; + $params = $task->getAdditionalParams(); + foreach($params as $param) + $k[] = $param['name']; + echo implode(', ', $k); + echo ""; + print "
"; + $t = $scheduler->getTasksByExtension($extname, $taskname); + if($t) { + print ""; + } + print ""; + print "
"; + echo "
\n"; } - echo "\n"; ?>