mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixes #1314 store orphan tags deletion message in session
... so that's it remains available after the redirect
This commit is contained in:
+9
-4
@@ -31,14 +31,12 @@ $tabsheet->assign();
|
|||||||
// | delete orphan tags |
|
// | delete orphan tags |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
|
|
||||||
$message_tags = "";
|
|
||||||
|
|
||||||
if (isset($_GET['action']) and 'delete_orphans' == $_GET['action'])
|
if (isset($_GET['action']) and 'delete_orphans' == $_GET['action'])
|
||||||
{
|
{
|
||||||
check_pwg_token();
|
check_pwg_token();
|
||||||
|
|
||||||
delete_orphan_tags();
|
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');
|
redirect(get_root_url().'admin.php?page=tags');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,10 +95,17 @@ $template->assign(
|
|||||||
array(
|
array(
|
||||||
'orphan_tag_names_array' => $orphan_tag_names_array,
|
'orphan_tag_names_array' => $orphan_tag_names_array,
|
||||||
'warning_tags' => $warning_tags,
|
'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 |
|
// | form creation |
|
||||||
// +-----------------------------------------------------------------------+
|
// +-----------------------------------------------------------------------+
|
||||||
|
|||||||
Reference in New Issue
Block a user