mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 02:05:56 +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;
|
||||
} else if ($cat == -2) {
|
||||
|
||||
$sth = $pdo->prepare("SELECT SUM(CASE WHEN unread THEN 1 ELSE 0 END) AS unread FROM
|
||||
ttrss_user_entries ue, ttrss_user_labels2 l
|
||||
WHERE article_id = ref_id AND
|
||||
ue.owner_uid = :uid");
|
||||
$sth = $pdo->prepare("SELECT COUNT(DISTINCT article_id) AS unread
|
||||
FROM ttrss_user_entries ue, ttrss_user_labels2 l
|
||||
WHERE article_id = ref_id AND unread IS true AND ue.owner_uid = :uid");
|
||||
$sth->execute(["uid" => $owner_uid]);
|
||||
$row = $sth->fetch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user