]> git.wh0rd.org Git - tt-rss.git/commitdiff
feed browser improvements
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 11:20:14 +0000 (12:20 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 11:20:14 +0000 (12:20 +0100)
modules/pref-feed-browser.php

index e9a848ee03df343867ee0d00fb13803f012ae6bc..91df4264ca0c93b0e66a7421bb5738e21cd53b89 100644 (file)
@@ -82,8 +82,6 @@
 
                set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser");
 
-               print "<div class=\"insensitive\">".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
-
                $limit = db_escape_string($_GET["limit"]);
 
                if (!$limit) $limit = 25;
                                        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 <a class='visibleLink' target='_blank' href='http://tt-rss.org/trac/wiki/FeedBrowser'>wiki</a> for more information."));
+                       return;
+
+               }
+
+               print "<div class=\"insensitive\">".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
+
+
                $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 
                }
 
                if ($feedctr == 0) {
-                       print "<div>".__('No feeds found.')."</div>";
+                       print_notice(__("Couldn't find any feeds available for subscription."));
                }
 
                print "</div>";