aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-12-17 00:11:56 +0000
committerplegall <plg@piwigo.org>2010-12-17 00:11:56 +0000
commitcfd6851c109965e9dab9333f8f41ecf65e64decf (patch)
tree48c9282c692bd88e459b519954bd52fd376037cd /admin
parentd5549a0bff5e6bf02ad2314b77e611e9d12303dd (diff)
merge r8167 from branch 2.1 to trunk
bug 2031 fixed: redirection after category deletion preserves the current node in the category tree. + the confirmation message is displayed after redirect, thanks to session git-svn-id: http://piwigo.org/svn/trunk@8168 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/cat_list.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/admin/cat_list.php b/admin/cat_list.php
index e485a3d21..b75b4d084 100644
--- a/admin/cat_list.php
+++ b/admin/cat_list.php
@@ -106,9 +106,15 @@ $navigation.= '</a>';
if (isset($_GET['delete']) and is_numeric($_GET['delete']))
{
delete_categories(array($_GET['delete']));
- array_push($page['infos'], l10n('Virtual album deleted'));
+ $_SESSION['page_infos'] = array(l10n('Virtual album deleted'));
update_global_rank();
- redirect(get_root_url().'admin.php?page=cat_list');
+
+ $redirect_url = get_root_url().'admin.php?page=cat_list';
+ if (isset($_GET['parent_id']))
+ {
+ $redirect_url.= '&parent_id='.$_GET['parent_id'];
+ }
+ redirect($redirect_url);
}
// request to add a virtual category
else if (isset($_POST['submitAdd']))