aboutsummaryrefslogtreecommitdiffstats
path: root/admin/element_set_global.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/element_set_global.php')
-rw-r--r--admin/element_set_global.php14
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']);