1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-03 05:37:12 +00:00

start work on showing number of unread articles in title

This commit is contained in:
Andrew Dolgov
2005-10-23 16:40:55 +01:00
parent bdd01d3f31
commit fc69e64169
2 changed files with 42 additions and 4 deletions

View File

@@ -28,6 +28,13 @@
/* FIXME this needs reworking */
function getGlobalCounters($link) {
$result = db_query($link, "SELECT count(id) as c_id FROM ttrss_entries
WHERE unread = true");
$c_id = db_fetch_result($result, 0, "c_id");
print "<counter id='global-unread' counter='$c_id'/>";
}
function getTagCounters($link) {
$result = db_query($link, "SELECT tag_name,count(ttrss_entries.id) AS count
FROM ttrss_tags,ttrss_entries WHERE
@@ -276,8 +283,8 @@
getLabelCounters($link);
getFeedCounters($link);
getTagCounters($link);
getGlobalCounters($link);
print "</rpc-reply>";
}
if ($subop == "mark") {
@@ -321,6 +328,7 @@
if (strchr($omode, "l")) getLabelCounters($link);
if (strchr($omode, "f")) getFeedCounters($link);
if (strchr($omode, "t")) getTagCounters($link);
getGlobalCounters($link);
print "</rpc-reply>";
}