Changeset 6871 for branches/2.1/include


Ignore:
Timestamp:
Sep 9, 2010, 3:21:06 PM (14 years ago)
Author:
rvelices
Message:

merge -r6870 from trunk
bug fix (recent some months): RSS and mail notifications could send the same thumbnail several times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/functions_notification.inc.php

    r6669 r6871  
    497497    { // get some thumbnails ...
    498498      $query = '
    499 SELECT id, path, name, tn_ext, file
     499SELECT DISTINCT id, path, name, tn_ext, file
    500500  FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
    501501  '.$where_sql.'
     
    516516    {// get some categories ...
    517517      $query = '
    518 SELECT c.uppercats, COUNT(DISTINCT i.id) AS img_count
     518SELECT DISTINCT c.uppercats, COUNT(DISTINCT i.id) AS img_count
    519519  FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id=image_id
    520520    INNER JOIN '.CATEGORIES_TABLE.' c ON c.id=category_id
Note: See TracChangeset for help on using the changeset viewer.