From a0af8d4624be9ca8579817d291036a6727aeb574 Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 28 Jul 2017 19:15:52 +0200 Subject: further switching to db exceptions instead of return false --- includes/pages/admin_import.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'includes/pages/admin_import.php') diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index 506a9dbe..bda5ba93 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -45,9 +45,6 @@ function admin_import() $add_minutes_end = 15; $shifttypes_source = ShiftTypes(); - if ($shifttypes_source === false) { - engelsystem_error('Unable to load shifttypes.'); - } $shifttypes = []; foreach ($shifttypes_source as $shifttype) { $shifttypes[$shifttype['id']] = $shifttype['name']; @@ -265,17 +262,11 @@ function admin_import() $add_minutes_end ); foreach ($events_new as $event) { - $result = Shift_create($event); - if ($result === false) { - engelsystem_error('Unable to create shift.'); - } + Shift_create($event); } foreach ($events_updated as $event) { - $result = Shift_update_by_psid($event); - if ($result === false) { - engelsystem_error('Unable to update shift.'); - } + Shift_update_by_psid($event); } foreach ($events_deleted as $event) { -- cgit v1.2.3-54-g00ecf