From daa8b051c57c3853ad5ae3c51bdf959239ec97da Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 11 Mar 2023 20:03:09 +0100 Subject: [PATCH] EditTag: on saving, redirect users to a page they can see --- controllers/EditTag.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/EditTag.php b/controllers/EditTag.php index 12de092..fcb0e96 100644 --- a/controllers/EditTag.php +++ b/controllers/EditTag.php @@ -182,8 +182,11 @@ class EditTag extends HTMLController $tag->save(); } - // Redirect to the tag management page. - header('Location: ' . BASEURL . '/managetags/'); + // Redirect to a clean page + if (Registry::get('user')->isAdmin()) + header('Location: ' . BASEURL . '/managetags/'); + else + header('Location: ' . BASEURL . '/edittag/?id=' . $id_tag); exit; } }