Changeset 6870


Ignore:
Timestamp:
Sep 9, 2010, 3:15:50 PM (10 years ago)
Author:
rvelices
Message:

bug fix (recent some months): RSS and mail notifications could send the same thumbnail several times

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_notification.inc.php

    r6668 r6870  
    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.