fixes #1314 store orphan tags deletion message in session

... so that's it remains available after the redirect
This commit is contained in:
plegall
2021-02-02 18:19:45 +01:00
parent c88daa88fa
commit a9f4449f4b

View File

@@ -31,14 +31,12 @@ $tabsheet->assign();
// | delete orphan tags |
// +-----------------------------------------------------------------------+
$message_tags = "";
if (isset($_GET['action']) and 'delete_orphans' == $_GET['action'])
{
check_pwg_token();
delete_orphan_tags();
$message_tags = array(l10n('Orphan tags deleted'));
$_SESSION['message_tags'] = l10n('Orphan tags deleted');
redirect(get_root_url().'admin.php?page=tags');
}
@@ -97,10 +95,17 @@ $template->assign(
array(
'orphan_tag_names_array' => $orphan_tag_names_array,
'warning_tags' => $warning_tags,
'message_tags' => $message_tags
)
);
$message_tags = '';
if (isset($_SESSION['message_tags']))
{
$message_tags = $_SESSION['message_tags'];
unset($_SESSION['message_tags']);
}
$template->assign('message_tags', $message_tags);
// +-----------------------------------------------------------------------+
// | form creation |
// +-----------------------------------------------------------------------+