mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 13:35:59 +00:00
getCategoryUnread: return correct unread count for labels category
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user