From 85e440339267859f9d3f70183c32f9443ca9a27a Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sat, 7 Sep 2019 01:44:15 +0200 Subject: Rooms: Save times as Worklog and notify on room deletion --- includes/model/Shifts_model.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'includes/model') 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] + ); } /** -- cgit v1.2.3-54-g00ecf