diff options
author | msquare <msquare@notrademark.de> | 2017-12-26 10:29:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-26 10:29:16 +0100 |
commit | de61c88d6de67d12d5de5b6dd0ab6b8c82e5a290 (patch) | |
tree | aac6a43cb88e3d803da5809ab37885b41bc811c6 /includes/model/ShiftEntry_model.php | |
parent | 879918864a9c6da0fe9be1aca6c443ec8df0afc3 (diff) | |
parent | f8d0a7c5b00a58c646871e355b5876dcc5890be5 (diff) |
Merge pull request #388 from MyIgel/master
Formatting, Docstrings, and fixup
Diffstat (limited to 'includes/model/ShiftEntry_model.php')
-rw-r--r-- | includes/model/ShiftEntry_model.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index 38db5959..bb9db49d 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -26,7 +26,7 @@ function ShiftEntry_new() * * @return int */ -function ShiftEntries_freeleaded_count() +function ShiftEntries_freeloaded_count() { $result = DB::selectOne('SELECT COUNT(*) FROM `ShiftEntry` WHERE `freeloaded` = 1'); @@ -38,7 +38,7 @@ function ShiftEntries_freeleaded_count() } /** - * List users subsribed to a given shift. + * List users subscribed to a given shift. * * @param int $shift_id * @return array @@ -102,7 +102,8 @@ function ShiftEntry_create($shift_entry) . ' signed up for shift ' . $shift['name'] . ' from ' . date('Y-m-d H:i', $shift['start']) . ' to ' . date('Y-m-d H:i', $shift['end']) - ); + ); + return $result; } @@ -149,20 +150,20 @@ function ShiftEntry_delete($shiftEntry) { mail_shift_removed(User($shiftEntry['UID']), Shift($shiftEntry['SID'])); DB::delete('DELETE FROM `ShiftEntry` WHERE `id` = ?', [$shiftEntry['id']]); - + $signout_user = User($shiftEntry['UID']); $shift = Shift($shiftEntry['SID']); $shifttype = ShiftType($shift['shifttype_id']); $room = Room($shift['RID']); $angeltype = AngelType($shiftEntry['TID']); - + engelsystem_log( - 'Shift signout: '. User_Nick_render($signout_user) . ' from shift ' . $shifttype['name'] + 'Shift signout: ' . User_Nick_render($signout_user) . ' from shift ' . $shifttype['name'] . ' at ' . $room['Name'] . ' from ' . date('Y-m-d H:i', $shift['start']) . ' to ' . date('Y-m-d H:i', $shift['end']) . ' as ' . $angeltype['name'] - ); + ); } /** |