From a46e2c1e6db63b03552bba9d6699b8509fd6daa0 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 22 Dec 2022 13:35:46 +0000 Subject: only display details if there are any --- Zotlabs/Module/Queueworker.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Module/Queueworker.php b/Zotlabs/Module/Queueworker.php index 0e0529bc0..440132881 100644 --- a/Zotlabs/Module/Queueworker.php +++ b/Zotlabs/Module/Queueworker.php @@ -61,10 +61,11 @@ class Queueworker extends Controller { $r = dbq("select workerq_cmd, count(*) as total from workerq where true group by workerq_cmd"); - $content .= "

Work items

"; - - foreach($r as $rr) { - $content .= $rr['workerq_cmd'] . ': ' . $rr['total'] . '
'; + if ($r) { + $content .= "

Work items

"; + foreach($r as $rr) { + $content .= $rr['workerq_cmd'] . ': ' . $rr['total'] . '
'; + } } $maxqueueworkers = get_config('queueworker', 'max_queueworkers', 4); -- cgit v1.2.3