diff options
author | Bot <bot@myigel.name> | 2019-09-08 02:25:49 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2019-12-08 02:12:56 +0100 |
commit | be39c63f46562eea173747d80cd91ac81e0b8e09 (patch) | |
tree | f4148db3009dff0dff99ce779798596f6b82a57b /includes/controller/shifttypes_controller.php | |
parent | 72123fcd31b612e35e5967c01faae9dd202756d8 (diff) |
Renamed redirect() to throwRedirect()
Diffstat (limited to 'includes/controller/shifttypes_controller.php')
-rw-r--r-- | includes/controller/shifttypes_controller.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/includes/controller/shifttypes_controller.php b/includes/controller/shifttypes_controller.php index 3c825d0c..ede360b8 100644 --- a/includes/controller/shifttypes_controller.php +++ b/includes/controller/shifttypes_controller.php @@ -18,12 +18,12 @@ function shifttype_delete_controller() { $request = request(); if (!$request->has('shifttype_id')) { - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } $shifttype = ShiftType($request->input('shifttype_id')); if (empty($shifttype)) { - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } if ($request->hasPostData('delete')) { @@ -31,7 +31,7 @@ function shifttype_delete_controller() engelsystem_log('Deleted shifttype ' . $shifttype['name']); success(sprintf(__('Shifttype %s deleted.'), $shifttype['name'])); - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } return [ @@ -59,7 +59,7 @@ function shifttype_edit_controller() $shifttype = ShiftType($request->input('shifttype_id')); if (empty($shifttype)) { error(__('Shifttype not found.')); - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } $shifttype_id = $shifttype['id']; $name = $shifttype['name']; @@ -99,7 +99,7 @@ function shifttype_edit_controller() engelsystem_log('Created shifttype ' . $name); success(__('Created shifttype.')); } - redirect(page_link_to('shifttypes', ['action' => 'view', 'shifttype_id' => $shifttype_id])); + throw_redirect(page_link_to('shifttypes', ['action' => 'view', 'shifttype_id' => $shifttype_id])); } } @@ -116,11 +116,11 @@ function shifttype_controller() { $request = request(); if (!$request->has('shifttype_id')) { - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } $shifttype = ShiftType($request->input('shifttype_id')); if (empty($shifttype)) { - redirect(page_link_to('shifttypes')); + throw_redirect(page_link_to('shifttypes')); } $angeltype = []; |