From 31689aeca1bee1c5e12c4645583e4f002d5ec17e Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 7 Nov 2011 10:53:23 +0000 Subject: merge r12575 from branch 2.3 to trunk bug 2491 fixed: on album admin screen, don't display "1 album moved" message when the album is not really moved. git-svn-id: http://piwigo.org/svn/trunk@12576 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/cat_modify.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'admin') diff --git a/admin/cat_modify.php b/admin/cat_modify.php index 3c944ce7b..5b29a85d9 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -75,7 +75,15 @@ if (isset($_POST['submit'])) set_cat_status(array($_GET['cat_id']), $_POST['status']); } - if (isset($_POST['parent']) and $cat_info['id_uppercat'] != $_POST['parent']) + // in case the use moves his album to the gallery root, we force + // $_POST['parent'] from 0 to null to be compared with + // $cat_info['id_uppercat'] + if (empty($_POST['parent'])) + { + $_POST['parent'] = null; + } + + if ($cat_info['id_uppercat'] != $_POST['parent']) { move_categories( array($_GET['cat_id']), $_POST['parent'] ); } -- cgit v1.2.3