bug 2105 : Browsing tags is slow if tags contains many photos

git-svn-id: http://piwigo.org/svn/trunk@8726 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2011-01-17 21:16:42 +00:00
parent b5046a4f94
commit e123585dde
4 changed files with 67 additions and 132 deletions
-15
View File
@@ -321,21 +321,6 @@ else
$items = get_image_ids_for_tags($page['tag_ids']);
// permissions depends on category, so to only keep images that are
// reachable to the connected user, we need to check category
// associations
if (!empty($items) )
{
$query = '
SELECT DISTINCT image_id
FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
WHERE image_id IN ('.implode(',', $items).')
'.$forbidden.
$conf['order_by'].'
;';
$items = array_from_query($query, 'image_id');
}
$page = array_merge(
$page,
array(