Permalink
Browse files

bug fix (recent some months): RSS and mail notifications could send t…

…he same thumbnail several times

git-svn-id: http://piwigo.org/svn/trunk@6870 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
modus75 committed Sep 9, 2010
1 parent 2a0cf1d commit 855a7dbb7a3f7ae325cde96ccb24f72b807ec225
Showing with 3 additions and 3 deletions.
  1. +3 −3 include/functions_notification.inc.php
@@ -496,7 +496,7 @@ function get_recent_post_dates($max_dates, $max_elements, $max_cats)
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 @@ function get_recent_post_dates($max_dates, $max_elements, $max_cats)
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 @@ function strptime($date, $fmt)
return $res;
}
}
?>
?>

0 comments on commit 855a7db

Please sign in to comment.