aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/element_set_global.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index ad1ff8135..568a37efb 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -114,6 +114,8 @@ SELECT id
;';
$dissociables = array_from_query($query, 'id');
+ if (!empty($dissociables))
+ {
$query = '
DELETE
FROM '.IMAGE_CATEGORY_TABLE.'
@@ -121,6 +123,7 @@ DELETE
AND image_id IN ('.implode(',', $dissociables).')
';
pwg_query($query);
+ }
update_category($_POST['dissociate']);
}