From d5631297dc42c06b1695fdb6f65d2b6a4b04c633 Mon Sep 17 00:00:00 2001 From: msquare Date: Tue, 12 Dec 2017 20:04:36 +0100 Subject: [PATCH] better logging of needed angeltypes for shifts and rooms --- includes/pages/admin_rooms.php | 4 +++- includes/pages/admin_shifts.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php index 55b52cd9..b1db9509 100644 --- a/includes/pages/admin_rooms.php +++ b/includes/pages/admin_rooms.php @@ -118,7 +118,9 @@ function admin_rooms() $angeltype = AngelType($angeltype_id); if ($angeltype != null) { NeededAngelType_add(null, $angeltype_id, $room_id, $angeltype_count); - $needed_angeltype_info[] = $angeltype['name'] . ': ' . $angeltype_count; + if($angeltype_count > 0) { + $needed_angeltype_info[] = $angeltype['name'] . ': ' . $angeltype_count; + } } } diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index 223ed074..22ce7635 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -338,7 +338,9 @@ function admin_shifts() $count ] ); - $needed_angel_types_info[] = $angel_type_source['name'] . ': ' . $count; + if($count > 0) { + $needed_angel_types_info[] = $angel_type_source['name'] . ': ' . $count; + } } } engelsystem_log('Shift needs following angel types: ' . join(', ', $needed_angel_types_info));