summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model')
-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)