From: Andrew Dolgov Date: Wed, 2 Jul 2014 05:53:58 +0000 (+0400) Subject: mail plugin: only mail unique articles X-Git-Tag: 1.13~7 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d7482a503a205be4169f2d2eb7d050dc1c2f8a42;p=tt-rss.git mail plugin: only mail unique articles --- diff --git a/plugins/mail/init.php b/plugins/mail/init.php index 5b61c235..5fcdf32a 100644 --- a/plugins/mail/init.php +++ b/plugins/mail/init.php @@ -56,7 +56,7 @@ class Mail extends Plugin { $tpl->setVariable('USER_EMAIL', $user_email, true); $tpl->setVariable('TTRSS_HOST', $_SERVER["HTTP_HOST"], true); - $result = db_query("SELECT link, content, title, note + $result = db_query("SELECT DISTINCT link, content, title, note FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND id IN ($param) AND owner_uid = " . $_SESSION["uid"]);