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
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}
}