summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/Shifts_model.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php
index 8c251209..6721c30e 100644
--- a/includes/model/Shifts_model.php
+++ b/includes/model/Shifts_model.php
@@ -1,6 +1,14 @@
<?php
use Engelsystem\ShiftsFilter;
+function Shifts_by_room($room) {
+ $result = sql_select("SELECT * FROM `Shifts` WHERE `RID`=" . sql_escape($room['RID']));
+ if ($result === false) {
+ engelsystem_error("Unable to load shifts.");
+ }
+ return $result;
+}
+
function Shifts_by_ShiftsFilter(ShiftsFilter $shiftsFilter, $user) {
$SQL = "SELECT DISTINCT `Shifts`.*, `ShiftTypes`.`name`, `Room`.`Name` as `room_name`, nat2.`special_needs` > 0 AS 'has_special_needs'
FROM `Shifts`