From 93629d04a721d7ad5162f7491458e43fe89aabaf Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 23 Sep 2008 21:42:01 +0000 Subject: bug 867 fixed: if the caddie is under management in admin/element_set, dissociating any image from a category doesn't hide from the caddie. git-svn-id: http://piwigo.org/svn/trunk@2576 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_global.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'admin') diff --git a/admin/element_set_global.php b/admin/element_set_global.php index e0df2d96b..3a3e79546 100644 --- a/admin/element_set_global.php +++ b/admin/element_set_global.php @@ -113,7 +113,6 @@ SELECT id ) ;'; $dissociables = array_from_query($query, 'id'); - echo '
'; print_r($dissociables); echo '
'; if (!empty($dissociables)) { @@ -125,10 +124,15 @@ DELETE '; pwg_query($query); - $page['cat_elements_id'] = array_diff( - $page['cat_elements_id'], - $dissociables - ); + // we remove the dissociated images if we are currently displaying the + // category to dissociate from. + if (is_numeric($_GET['cat']) and $_POST['dissociate'] == $_GET['cat']) + { + $page['cat_elements_id'] = array_diff( + $page['cat_elements_id'], + $dissociables + ); + } } update_category($_POST['dissociate']); -- cgit v1.2.3