EditTag: on saving, redirect users to a page they can see

This commit is contained in:
Aaron van Geffen 2023-03-11 20:03:09 +01:00
parent 27f69b0a74
commit daa8b051c5

View File

@ -182,8 +182,11 @@ class EditTag extends HTMLController
$tag->save(); $tag->save();
} }
// Redirect to the tag management page. // Redirect to a clean page
header('Location: ' . BASEURL . '/managetags/'); if (Registry::get('user')->isAdmin())
header('Location: ' . BASEURL . '/managetags/');
else
header('Location: ' . BASEURL . '/edittag/?id=' . $id_tag);
exit; exit;
} }
} }