summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-07 08:43:51 +0400
committerAndrew Dolgov <[email protected]>2013-04-07 08:43:51 +0400
commit33373eca49e900a6bda23c45698ac2f1d4200f47 (patch)
tree44e69a8fccb491daf21ab18fc8a8ad9e8e3a0fa1 /include
parente186015e4e151128987898d53c8c9386d120698d (diff)
getLabelCounters: properly check for user_entry uid (closes #671)
Diffstat (limited to 'include')
-rw-r--r--include/functions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php
index 0469c512d..f2d25db07 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -317,7 +317,7 @@
global $fetch_last_error;
global $fetch_last_error_code;
-
+
$url = str_replace(' ', '%20', $url);
if (!defined('NO_CURL') && function_exists('curl_init') && !ini_get("open_basedir")) {
@@ -1469,7 +1469,8 @@
$result = db_query($link, "SELECT id,caption,COUNT(unread) AS unread
FROM ttrss_labels2 LEFT JOIN ttrss_user_labels2 ON
(ttrss_labels2.id = label_id)
- LEFT JOIN ttrss_user_entries ON (ref_id = article_id AND unread = true)
+ LEFT JOIN ttrss_user_entries ON (ref_id = article_id AND unread = true
+ AND ttrss_user_entries.owner_uid = $owner_uid)
WHERE ttrss_labels2.owner_uid = $owner_uid GROUP BY ttrss_labels2.id,
ttrss_labels2.caption");