aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/element_set_global.php10
-rw-r--r--admin/element_set_unit.php10
2 files changed, 18 insertions, 2 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php
index 3824b98eb..26eb57ca6 100644
--- a/admin/element_set_global.php
+++ b/admin/element_set_global.php
@@ -451,7 +451,15 @@ SELECT id,path,tn_ext,file,filesize,level
}
$query.= '
- WHERE id IN ('.implode(',', $page['cat_elements_id']).')
+ WHERE id IN ('.implode(',', $page['cat_elements_id']).')';
+
+ if (is_numeric($_GET['cat']))
+ {
+ $query.= '
+ AND category_id = '.$_GET['cat'];
+ }
+
+ $query.= '
'.$conf['order_by'].'
LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].'
;';
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index f4901a343..fa89db7f2 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -211,7 +211,15 @@ SELECT id,path,tn_ext,name,date_creation,comment,author,level,file
}
$query.= '
- WHERE id IN ('.implode(',', $page['cat_elements_id']).')
+ WHERE id IN ('.implode(',', $page['cat_elements_id']).')';
+
+ if (is_numeric($_GET['cat']))
+ {
+ $query.= '
+ AND category_id = '.$_GET['cat'];
+ }
+
+ $query.= '
'.$conf['order_by'].'
LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].'
;';