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
This commit is contained in:
parent
a02463646f
commit
8f0035ae66
2 changed files with 18 additions and 2 deletions
|
@ -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'].'
|
||||
;';
|
||||
|
|
|
@ -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'].'
|
||||
;';
|
||||
|
|
Loading…
Add table
Reference in a new issue