diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-12-28 14:56:02 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-12-28 14:56:02 +0100 |
commit | ca37de95daa065c25b7a4b227b539c18e713e00b (patch) | |
tree | 763ddb63b01919bf9f956bd0e464e7a04671df1d /includes | |
parent | 739eddefd512b2c7775d6f4831186317217fcfbc (diff) |
fix shift update
Diffstat (limited to 'includes')
-rw-r--r-- | includes/model/Room_model.php | 1 | ||||
-rw-r--r-- | includes/model/ShiftEntry_model.php | 2 | ||||
-rw-r--r-- | includes/model/Shifts_model.php | 2 | ||||
-rw-r--r-- | includes/pages/user_shifts.php | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/includes/model/Room_model.php b/includes/model/Room_model.php index 49ad0c60..523436c6 100644 --- a/includes/model/Room_model.php +++ b/includes/model/Room_model.php @@ -19,6 +19,7 @@ function Room_ids() { */ function Room($id) { $room_source = sql_select("SELECT * FROM `Room` WHERE `RID`='" . sql_escape($id) . "' AND `show` = 'Y' LIMIT 1"); + if ($room_source === false) return false; if (count($room_source) > 0) diff --git a/includes/model/ShiftEntry_model.php b/includes/model/ShiftEntry_model.php index 1579b93b..008531ff 100644 --- a/includes/model/ShiftEntry_model.php +++ b/includes/model/ShiftEntry_model.php @@ -16,7 +16,7 @@ function ShiftEntries_by_shift($shift_id) { FROM `ShiftEntry` JOIN `User` ON `ShiftEntry`.`UID`=`User`.`UID` JOIN `AngelTypes` ON `ShiftEntry`.`TID`=`AngelTypes`.`id` - WHERE `ShiftEntry`.`SID`='" . sql_escape($shift_id)) . "'"; + WHERE `ShiftEntry`.`SID`='" . sql_escape($shift_id) . "'"); } /** diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index b55d008e..c12d3e01 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -85,7 +85,7 @@ function Shift_signup_allowed($shift, $angeltype, $user_angeltype = null, $user_ * Delete a shift by its external id. */ function Shift_delete_by_psid($shift_psid) { - return sql_query("DELETE FROM `Shifts` WHERE `PSID`='" . sql_escape($shift_psid)."'"); + return sql_query("DELETE FROM `Shifts` WHERE `PSID`='" . sql_escape($shift_psid) . "'"); } /** diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 46be08d3..c32fb220 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -151,6 +151,7 @@ function user_shifts() { $shift['RID'] = $rid; $shift['start'] = $start; $shift['end'] = $end; + $result = Shift_update($shift); if ($result === false) engelsystem_error('Unable to update shift.'); |