Skip to content

Commit

Permalink
merge r7555 from branch 2.1 to trunk
Browse files Browse the repository at this point in the history
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
  • Loading branch information
plegall committed Nov 1, 2010
1 parent 3eb3e32 commit a5ad1bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion admin/element_set_global.php
Expand Up @@ -451,7 +451,15 @@
}

$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'].'
;';
Expand Down
10 changes: 9 additions & 1 deletion admin/element_set_unit.php
Expand Up @@ -211,7 +211,15 @@
}

$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'].'
;';
Expand Down

0 comments on commit a5ad1bb

Please sign in to comment.