diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-29 23:06:46 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-29 23:16:41 +0200 |
commit | d0074cf0069322fe175fb385b91c974fc2771547 (patch) | |
tree | 713fcb1f426c8a693938e3c8bbfc685e57f79e69 /includes/controller/shifttypes_controller.php | |
parent | 50da458d8907cc7c05938565faa80b271bbf9b3d (diff) | |
parent | 581b81f1b25dc6b6f0a3b34810c293738fd40217 (diff) |
Merge remote-tracking branch 'engelsystem/feature-igel-rewrite'
# Conflicts:
# includes/controller/angeltypes_controller.php
# includes/pages/admin_groups.php
# includes/pages/user_settings.php
# includes/sys_page.php
# src/Exceptions/Handler.php
# src/Http/Request.php
Diffstat (limited to 'includes/controller/shifttypes_controller.php')
-rw-r--r-- | includes/controller/shifttypes_controller.php | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php index 3ef2675f..4e7cd92c 100644 --- a/includes/controller/shifttypes_controller.php +++ b/includes/controller/shifttypes_controller.php @@ -28,10 +28,7 @@ function shifttype_delete_controller() } if ($request->has('confirmed')) { - $result = ShiftType_delete($shifttype['id']); - if (empty($result)) { - engelsystem_error('Unable to delete shifttype.'); - } + ShiftType_delete($shifttype['id']); engelsystem_log('Deleted shifttype ' . $shifttype['name']); success(sprintf(_('Shifttype %s deleted.'), $shifttype['name'])); @@ -93,17 +90,13 @@ function shifttype_edit_controller() if ($valid) { if ($shifttype_id) { - $result = ShiftType_update($shifttype_id, $name, $angeltype_id, $description); - if ($result === false) { - engelsystem_error('Unable to update shifttype.'); - } + ShiftType_update($shifttype_id, $name, $angeltype_id, $description); + engelsystem_log('Updated shifttype ' . $name); success(_('Updated shifttype.')); } else { $shifttype_id = ShiftType_create($name, $angeltype_id, $description); - if ($shifttype_id === false) { - engelsystem_error('Unable to create shifttype.'); - } + engelsystem_log('Created shifttype ' . $name); success(_('Created shifttype.')); } @@ -150,9 +143,6 @@ function shifttype_controller() function shifttypes_list_controller() { $shifttypes = ShiftTypes(); - if ($shifttypes === false) { - engelsystem_error('Unable to load shifttypes.'); - } return [ shifttypes_title(), |