From 5794c4cab8f6ef0529dfc51343b5ec78b134fb2a Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 28 Jul 2017 18:50:00 +0200 Subject: clear delete queries from false resuls --- includes/model/Shifts_model.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'includes/model/Shifts_model.php') diff --git a/includes/model/Shifts_model.php b/includes/model/Shifts_model.php index 6e69fe35..2288e3cc 100644 --- a/includes/model/Shifts_model.php +++ b/includes/model/Shifts_model.php @@ -402,34 +402,22 @@ function Shift_signup_allowed( * Delete a shift by its external id. * * @param int $shift_psid - * @return bool */ function Shift_delete_by_psid($shift_psid) { DB::delete('DELETE FROM `Shifts` WHERE `PSID`=?', [$shift_psid]); - - if (DB::getStm()->errorCode() != '00000') { - return false; - } - - return true; } /** * Delete a shift. * * @param int $shift_id - * @return bool */ function Shift_delete($shift_id) { mail_shift_delete(Shift($shift_id)); - $result = DB::delete('DELETE FROM `Shifts` WHERE `SID`=?', [$shift_id]); - if (DB::getStm()->errorCode() != '00000') { - engelsystem_error('Unable to delete shift.'); - } - return $result; + DB::delete('DELETE FROM `Shifts` WHERE `SID`=?', [$shift_id]); } /** -- cgit v1.2.3-70-g09d2