summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-28 19:15:52 +0200
committermsquare <msquare@notrademark.de>2017-07-28 19:15:52 +0200
commita0af8d4624be9ca8579817d291036a6727aeb574 (patch)
tree869e7c39a3ec05aa6a4e478b51eb59bbf42746d1 /includes/pages
parent5794c4cab8f6ef0529dfc51343b5ec78b134fb2a (diff)
further switching to db exceptions instead of return false
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_import.php13
-rw-r--r--includes/pages/admin_rooms.php3
-rw-r--r--includes/pages/admin_shifts.php6
3 files changed, 2 insertions, 20 deletions
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) {
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index d49db707..5d10304b 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -50,9 +50,6 @@ function admin_rooms()
if (test_request_int('id')) {
$room = Room($request->input('id'), false);
- if ($room === false) {
- engelsystem_error('Unable to load room.');
- }
if ($room == null) {
redirect(page_link_to('admin_rooms'));
}
diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php
index 5b53f9cd..36028792 100644
--- a/includes/pages/admin_shifts.php
+++ b/includes/pages/admin_shifts.php
@@ -44,9 +44,6 @@ function admin_shifts()
// Load shift types
$shifttypes_source = ShiftTypes();
- if ($shifttypes_source === false) {
- engelsystem_error('Unable to load shift types.');
- }
$shifttypes = [];
foreach ($shifttypes_source as $shifttype) {
$shifttypes[$shifttype['id']] = $shifttype['name'];
@@ -319,9 +316,6 @@ function admin_shifts()
$shift['URL'] = null;
$shift['PSID'] = null;
$shift_id = Shift_create($shift);
- if ($shift_id === false) {
- engelsystem_error('Unable to create shift.');
- }
engelsystem_log(
'Shift created: ' . $shifttypes[$shift['shifttype_id']]