From 3bc9d09f7aecb5f5b15bb1f28e11316d37551f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Mon, 9 Dec 2013 17:24:54 +0100 Subject: [PATCH] api all shifts export should only show needed angeltypes with count greater than 0 --- includes/model/NeededAngelTypes_model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/model/NeededAngelTypes_model.php b/includes/model/NeededAngelTypes_model.php index c4d12fdb..8cd857b6 100644 --- a/includes/model/NeededAngelTypes_model.php +++ b/includes/model/NeededAngelTypes_model.php @@ -10,8 +10,9 @@ function NeededAngelTypes_by_shift($shift) { SELECT `NeededAngelTypes`.*, `AngelTypes`.`name`, `AngelTypes`.`restricted` FROM `NeededAngelTypes` JOIN `AngelTypes` ON `AngelTypes`.`id` = `NeededAngelTypes`.`angel_type_id` - WHERE `shift_id`=" . sql_escape($shift['SID']) . " - OR `room_id`=" . sql_escape($shift['RID']) . " + WHERE (`shift_id`=" . sql_escape($shift['SID']) . " + OR `room_id`=" . sql_escape($shift['RID']) . ") + AND `count` > 0 ORDER BY `room_id` DESC "); if ($needed_angeltypes_source === false)