Correcting a bug in special categories (favorites, most seen, most

recent... non numeric categories) : when a picture is linked to more than
one category, it's only displayed once.


git-svn-id: http://piwigo.org/svn/trunk@64 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2003-09-05 19:27:45 +00:00
parent 839771e0b6
commit 4f6dabea73
3 changed files with 22 additions and 16 deletions
+2 -2
View File
@@ -493,9 +493,9 @@ function initialize_category( $calling_page = 'category' )
{
$page['title'] = $lang['favorites'];
$page['where'] = ', '.PREFIX_TABLE.'favorites';
$page['where'] = ', '.PREFIX_TABLE.'favorites AS fav';
$page['where'].= ' WHERE user_id = '.$user['id'];
$page['where'].= ' AND image_id = id';
$page['where'].= ' AND fav.image_id = id';
$query = 'SELECT COUNT(*) AS nb_total_images';
$query.= ' FROM '.PREFIX_TABLE.'favorites';