aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-09-09 13:21:06 +0000
committerrvelices <rv-github@modusoptimus.com>2010-09-09 13:21:06 +0000
commite05f2b5e613c39801c8665bffb1222c353485431 (patch)
treec6ff4f3e623acc18f783e745443f826a0a554c48 /include
parent82eeaa70a042d06cbe41cf1f2ac8c3f6dfd6e107 (diff)
merge -r6870 from trunk
bug fix (recent some months): RSS and mail notifications could send the same thumbnail several times git-svn-id: http://piwigo.org/svn/branches/2.1@6871 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_notification.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php
index 363ea7e58..4f5f20e80 100644
--- a/include/functions_notification.inc.php
+++ b/include/functions_notification.inc.php
@@ -496,7 +496,7 @@ SELECT date_available,
if ($max_elements>0)
{ // get some thumbnails ...
$query = '
-SELECT id, path, name, tn_ext, file
+SELECT DISTINCT id, path, name, tn_ext, file
FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
'.$where_sql.'
AND date_available=\''.$dates[$i]['date_available'].'\'
@@ -515,7 +515,7 @@ SELECT id, path, name, tn_ext, file
if ($max_cats>0)
{// get some categories ...
$query = '
-SELECT c.uppercats, COUNT(DISTINCT i.id) AS img_count
+SELECT DISTINCT c.uppercats, COUNT(DISTINCT i.id) AS img_count
FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id=image_id
INNER JOIN '.CATEGORIES_TABLE.' c ON c.id=category_id
'.$where_sql.'
@@ -635,4 +635,4 @@ if(!function_exists("strptime"))
return $res;
}
}
-?> \ No newline at end of file
+?>