summaryrefslogtreecommitdiff
path: root/includes/controller/shifttypes_controller.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
committermsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
commita157004f4aefaa5e2265f852f9432becedee1d66 (patch)
treec47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/controller/shifttypes_controller.php
parent36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff)
handle failed db queries in Db class
Diffstat (limited to 'includes/controller/shifttypes_controller.php')
-rw-r--r--includes/controller/shifttypes_controller.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php
index acdeb982..790bbb56 100644
--- a/includes/controller/shifttypes_controller.php
+++ b/includes/controller/shifttypes_controller.php
@@ -93,17 +93,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.'));
}