summaryrefslogtreecommitdiff
path: root/includes/pages/user_shifts.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/user_shifts.php')
-rw-r--r--includes/pages/user_shifts.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 2f0bee6e..c1a5cc91 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -178,8 +178,9 @@ function user_shifts() {
// Schicht löschen bestätigt
if (isset($_REQUEST['delete'])) {
- sql_query("DELETE FROM `NeededAngelTypes` WHERE `shift_id`=" . sql_escape($shift_id));
- sql_query("DELETE FROM `Shifts` WHERE `SID`=" . sql_escape($shift_id) . " LIMIT 1");
+ $result = Shift_delete($shift_id);
+ if ($result === false)
+ engelsystem_error('Unable to delete shift.');
engelsystem_log("Deleted shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end']));
success(_("Shift deleted."));