diff options
author | plegall <plg@piwigo.org> | 2008-09-23 21:42:01 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2008-09-23 21:42:01 +0000 |
commit | 93629d04a721d7ad5162f7491458e43fe89aabaf (patch) | |
tree | 499f7cd89f82a76db76ba584128c7535583ce720 /admin | |
parent | 52f0cce24f871ed187408ca0f4e33f4ee8863cfe (diff) |
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
Diffstat (limited to 'admin')
-rw-r--r-- | admin/element_set_global.php | 14 |
1 files changed, 9 insertions, 5 deletions
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 '<pre>'; print_r($dissociables); echo '</pre>'; 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']); |