From 34248bb20cb3102fbcff76fcd7e059c12d87a6c3 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 25 Nov 2016 14:27:47 +0100 Subject: show freeload comments to supporters (user shift admin) --- includes/model/Shifts_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'includes/model/Shifts_model.php') diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 67580eee..b1d4ca5e 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -261,10 +261,11 @@ function Shift_create($shift) { /** * Return users shifts. */ -function Shifts_by_user($user) { +function Shifts_by_user($user, $include_freeload_comments = false) { $result = sql_select(" SELECT `ShiftTypes`.`id` as `shifttype_id`, `ShiftTypes`.`name`, `ShiftEntry`.`id`, `ShiftEntry`.`SID`, `ShiftEntry`.`TID`, `ShiftEntry`.`UID`, `ShiftEntry`.`freeloaded`, `ShiftEntry`.`Comment`, + " . ($include_freeload_comments ? "`ShiftEntry`.`freeload_comment`, " : "") . " `Shifts`.*, `Room`.* FROM `ShiftEntry` JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) -- cgit v1.2.3-54-g00ecf