summaryrefslogtreecommitdiff
path: root/includes/model/Shifts_model.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-28 18:50:00 +0200
committermsquare <msquare@notrademark.de>2017-07-28 18:50:00 +0200
commit5794c4cab8f6ef0529dfc51343b5ec78b134fb2a (patch)
tree02651ade8969f2e1cb0c75e0fc9a91cac08f8121 /includes/model/Shifts_model.php
parent144b453bc6b594ea16838a006eb20b04e5b5ec19 (diff)
clear delete queries from false resuls
Diffstat (limited to 'includes/model/Shifts_model.php')
-rw-r--r--includes/model/Shifts_model.php14
1 files changed, 1 insertions, 13 deletions
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]);
}
/**