mirror of https://tt-rss.org/git/tt-rss.git
getCategoryUnread: return correct unread count for labels category
This commit is contained in:
parent
cdd2b6fd22
commit
0e9e1ad112
|
@ -1313,10 +1313,9 @@ class Feeds extends Handler_Protected {
|
||||||
return 0;
|
return 0;
|
||||||
} else if ($cat == -2) {
|
} else if ($cat == -2) {
|
||||||
|
|
||||||
$sth = $pdo->prepare("SELECT SUM(CASE WHEN unread THEN 1 ELSE 0 END) AS unread FROM
|
$sth = $pdo->prepare("SELECT COUNT(DISTINCT article_id) AS unread
|
||||||
ttrss_user_entries ue, ttrss_user_labels2 l
|
FROM ttrss_user_entries ue, ttrss_user_labels2 l
|
||||||
WHERE article_id = ref_id AND
|
WHERE article_id = ref_id AND unread IS true AND ue.owner_uid = :uid");
|
||||||
ue.owner_uid = :uid");
|
|
||||||
$sth->execute(["uid" => $owner_uid]);
|
$sth->execute(["uid" => $owner_uid]);
|
||||||
$row = $sth->fetch();
|
$row = $sth->fetch();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue