From a5ad1bbe7e45432401e08c13a4a507be0807b8a4 Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 1 Nov 2010 21:06:51 +0000 Subject: merge r7555 from branch 2.1 to trunk bug 1988 fixed: avoid duplicate thumbnails for photos linked to several categories when managing all photos of one of these categories. git-svn-id: http://piwigo.org/svn/trunk@7556 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_unit.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'admin/element_set_unit.php') 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'].' ;'; -- cgit v1.2.3