diff options
-rw-r--r-- | admin/element_set_global.php | 10 | ||||
-rw-r--r-- | admin/element_set_unit.php | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/admin/element_set_global.php b/admin/element_set_global.php index 8377bdd41..eefe08000 100644 --- a/admin/element_set_global.php +++ b/admin/element_set_global.php @@ -466,7 +466,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'].' ;'; |