diff options
author | msquare <msquare@notrademark.de> | 2019-12-08 11:48:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-08 11:48:58 +0100 |
commit | a3a938a1210f1bfb2680c25b2bcf53e47444bdba (patch) | |
tree | fd4c13fd9b714c0d8c60b6d3fe3e2fc88b82b717 /includes/controller/angeltypes_controller.php | |
parent | b540ac93856065ce6e145930b6611e0a0946d646 (diff) | |
parent | 064a1750279be244f86cf24f29749b391b11f1dd (diff) |
Merge pull request #685 from MyIgel/schedule-import
Rebuild Schedule import
Diffstat (limited to 'includes/controller/angeltypes_controller.php')
-rw-r--r-- | includes/controller/angeltypes_controller.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index 63bf53bd..b06a258c 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -79,7 +79,7 @@ function angeltypes_about_controller() function angeltype_delete_controller() { if (!auth()->can('admin_angel_types')) { - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } $angeltype = load_angeltype(); @@ -87,7 +87,7 @@ function angeltype_delete_controller() if (request()->hasPostData('delete')) { AngelType_delete($angeltype); success(sprintf(__('Angeltype %s deleted.'), AngelType_name_render($angeltype))); - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } return [ @@ -112,13 +112,13 @@ function angeltype_edit_controller() $angeltype = load_angeltype(); if (!User_is_AngelType_supporter(auth()->user(), $angeltype)) { - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } } else { // New angeltype if ($supporter_mode) { // Supporters aren't allowed to create new angeltypes. - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } $angeltype = AngelType_new(); } @@ -157,7 +157,7 @@ function angeltype_edit_controller() } success('Angel type saved.'); - redirect(angeltype_link($angeltype['id'])); + throw_redirect(angeltype_link($angeltype['id'])); } } @@ -177,7 +177,7 @@ function angeltype_controller() $user = auth()->user(); if (!auth()->can('angeltypes')) { - redirect(page_link_to('/')); + throw_redirect(page_link_to('/')); } $angeltype = load_angeltype(); @@ -275,7 +275,7 @@ function angeltypes_list_controller() $user = auth()->user(); if (!auth()->can('angeltypes')) { - redirect(page_link_to('/')); + throw_redirect(page_link_to('/')); } $angeltypes = AngelTypes_with_user($user->id); @@ -346,13 +346,13 @@ function load_angeltype() { $request = request(); if (!$request->has('angeltype_id')) { - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } $angeltype = AngelType($request->input('angeltype_id')); if (empty($angeltype)) { error(__('Angeltype doesn\'t exist . ')); - redirect(page_link_to('angeltypes')); + throw_redirect(page_link_to('angeltypes')); } return $angeltype; |