diff options
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r-- | includes/model/ShiftEntry_model.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index 6324c3bf..425b92e8 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -51,10 +51,12 @@ function ShiftEntry_update($shift_entry) { */ function ShiftEntry($shift_entry_id) { $shift_entry = sql_select("SELECT * FROM `ShiftEntry` WHERE `id`='" . sql_escape($shift_entry_id) . "'"); - if ($shift_entry === false) + if ($shift_entry === false) { return false; - if (count($shift_entry) == 0) + } + if (count($shift_entry) == 0) { return null; + } return $shift_entry[0]; } @@ -89,8 +91,8 @@ function ShiftEntries_upcoming_for_user($user) { * * @param User $user */ -function ShiftEntries_finished_by_user($user){ - return sql_select(" +function ShiftEntries_finished_by_user($user) { + return sql_select(" SELECT * FROM `ShiftEntry` JOIN `Shifts` ON (`Shifts`.`SID` = `ShiftEntry`.`SID`) |