summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-08-16 14:13:33 +0100
committerAndrew Dolgov <[email protected]>2006-08-16 14:13:33 +0100
commit318260cc8a4b09403678a1a953fc7d646d3c268d (patch)
tree55754ecd6510353f3e28ef704b1a2385acf90ff3 /backend.php
parent3831db41c4b24050ad0ef2d0b58a5a042d4313bb (diff)
move outputFeedList to getFeedUnread, misc. hidden-related fixes
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php23
1 files changed, 6 insertions, 17 deletions
diff --git a/backend.php b/backend.php
index 8928582b3..428939fe9 100644
--- a/backend.php
+++ b/backend.php
@@ -172,12 +172,7 @@
print "<li id=\"feedCatHolder\"><ul class=\"feedCatList\">";
}
- $result = db_query($link, "SELECT count(id) as num_starred
- FROM ttrss_entries,ttrss_user_entries
- WHERE marked = true AND
- ttrss_user_entries.ref_id = ttrss_entries.id AND
- unread = true AND owner_uid = '$owner_uid'");
- $num_starred = db_fetch_result($result, 0, "num_starred");
+ $num_starred = getFeedUnread($link, -1);
$class = "virt";
@@ -207,16 +202,10 @@
while ($line = db_fetch_assoc($result)) {
error_reporting (0);
-
- $tmp_result = db_query($link, "SELECT count(ttrss_entries.id) as count
- FROM ttrss_entries,ttrss_user_entries,ttrss_feeds
- WHERE (" . $line["sql_exp"] . ") AND unread = true AND
- ttrss_user_entries.ref_id = ttrss_entries.id AND
- ttrss_user_entries.feed_id = ttrss_feeds.id
- AND ttrss_user_entries.owner_uid = '$owner_uid'");
-
- $count = db_fetch_result($tmp_result, 0, "count");
-
+
+ $label_id = -$line['id'] - 11;
+ $count = getFeedUnread($link, $label_id);
+
$class = "label";
if ($count > 0) {
@@ -225,7 +214,7 @@
error_reporting (DEFAULT_ERROR_LEVEL);
- printFeedEntry(-$line["id"]-11,
+ printFeedEntry($label_id,
$class, db_unescape_string($line["description"]),
$count, "images/label.png", $link);