diff options
author | plegall <plg@piwigo.org> | 2010-11-01 21:06:51 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-11-01 21:06:51 +0000 |
commit | a5ad1bbe7e45432401e08c13a4a507be0807b8a4 (patch) | |
tree | 76e0619ef8964752d7f0652790a1a9b58827cc20 | |
parent | 3eb3e323b1ac6da4258c694114e7fa852cff1315 (diff) |
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
Diffstat (limited to '')
-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 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'].' ;'; |