diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2019-09-07 01:44:15 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-09-18 04:27:59 +0200 |
commit | 85e440339267859f9d3f70183c32f9443ca9a27a (patch) | |
tree | 7f269276fcf8b7e5c6a600ae59f66482a667fa0f /includes/model | |
parent | d71b27b78b29a2ed725a6e631bf8085bde257f18 (diff) |
Rooms: Save times as Worklog and notify on room deletion
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/Shifts_model.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 2408eb49..01295fbc 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -80,12 +80,15 @@ function Shifts_from_frab() } /** - * @param array $room + * @param array|int $room * @return array[] */ function Shifts_by_room($room) { - return DB::select('SELECT * FROM `Shifts` WHERE `RID`=? ORDER BY `start`', [$room['RID']]); + return DB::select( + 'SELECT * FROM `Shifts` WHERE `RID`=? ORDER BY `start`', + [is_array($room) ? $room['RID'] : $room] + ); } /** |