summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-20 06:31:56 +0100
committerAndrew Dolgov <[email protected]>2009-01-20 06:31:56 +0100
commitd7135e2a81fd78621bf59041f022a683583cd671 (patch)
tree2ab8adfd93fcacab7bc6dc3981d0b23f0e6117d4
parentff863e0002077a4b42750b35ecfa0bf64f7e7629 (diff)
fix feedlist output when sorted by unread count
-rw-r--r--functions.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index fcefc90f9..962057e33 100644
--- a/functions.php
+++ b/functions.php
@@ -4282,9 +4282,13 @@
".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated_noms,
cat_id,last_error,
ttrss_feed_categories.title AS category,
- ttrss_feed_categories.collapsed
- FROM ttrss_feeds LEFT JOIN ttrss_feed_categories
- ON (ttrss_feed_categories.id = cat_id)
+ ttrss_feed_categories.collapsed,
+ value AS unread
+ FROM ttrss_feeds LEFT JOIN ttrss_feed_categories
+ ON (ttrss_feed_categories.id = cat_id)
+ LEFT JOIN ttrss_counters_cache
+ ON
+ (ttrss_feeds.id = feed_id)
WHERE
ttrss_feeds.hidden = false AND
ttrss_feeds.owner_uid = '$owner_uid' AND parent_feed IS NULL
@@ -4311,10 +4315,9 @@
if (!$feed) $feed = "[Untitled]";
$feed_id = $line["id"];
+ $unread = $line["unread"];
$subop = $_GET["subop"];
-
- $unread = ccache_find($link, $feed_id, $_SESSION["uid"]);
if (get_pref($link, 'HEADLINES_SMART_DATE')) {
$last_updated = smart_date_time(strtotime($line["last_updated_noms"]));