From 572646a9bd5c68603984ed7f37230ca55ecf572b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Jan 2009 12:20:14 +0100 Subject: [PATCH] feed browser improvements --- modules/pref-feed-browser.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/pref-feed-browser.php b/modules/pref-feed-browser.php index e9a848ee..91df4264 100644 --- a/modules/pref-feed-browser.php +++ b/modules/pref-feed-browser.php @@ -82,8 +82,6 @@ set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser"); - print "
".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."
"; - $limit = db_escape_string($_GET["limit"]); if (!$limit) $limit = 25; @@ -97,6 +95,20 @@ owner_uid = '$owner_uid')) GROUP BY feed_url ORDER BY subscribers DESC LIMIT $limit"); */ + $result = db_query($link, "SELECT COUNT(feed_url) AS cfu FROM + ttrss_feedbrowser_cache"); + + $cfu = db_fetch_result($result, 0, "cfu"); + + if ($cfu == 0) { + print_warning(__("Feed browser cache information is missing. Please refer to the wiki for more information.")); + return; + + } + + print "
".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."
"; + + $result = db_query($link, "SELECT feed_url, subscribers FROM ttrss_feedbrowser_cache WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf WHERE tf.feed_url = ttrss_feedbrowser_cache.feed_url @@ -174,7 +186,7 @@ } if ($feedctr == 0) { - print "
".__('No feeds found.')."
"; + print_notice(__("Couldn't find any feeds available for subscription.")); } print ""; -- 2.39.5