summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-12-09 17:24:54 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-12-09 17:24:54 +0100
commit3bc9d09f7aecb5f5b15bb1f28e11316d37551f3f (patch)
tree6d81396966cb3c4efe9cbafcfce3b6cf2600902a
parent4aa85a3ff247a6ff22640a4a9478a55cc79ebf5b (diff)
api all shifts export should only show needed angeltypes with count greater than 0
-rw-r--r--includes/model/NeededAngelTypes_model.php5
1 files 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)