aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-11-01 21:06:30 +0000
committerplegall <plg@piwigo.org>2010-11-01 21:06:30 +0000
commit8f0035ae66bcdff38b07191278500a1e889c6bbf (patch)
tree58c471222bb3a4fc78859f38db71b2ce6bc9aa96
parenta02463646f8f0605ac98e8683bd67ac5a059b362 (diff)
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/branches/2.1@7555 68402e56-0260-453c-a942-63ccdbb3a9ee
-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 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'].'
;';