]> git.wh0rd.org Git - tt-rss.git/commitdiff
top25 button uses feedbrowser cache
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 09:57:08 +0000 (10:57 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 09:57:08 +0000 (10:57 +0100)
modules/pref-feeds.php

index 350d6d15d5ecc0902f947cf1442a604d1795da09..790555421ac25cf1eef3b0262307cf0f91a11277 100644 (file)
 
                        $owner_uid = $_SESSION["uid"];
 
-                       $result = db_query($link, "SELECT feed_url,COUNT(id) AS subscribers
+/*                     $result = db_query($link, "SELECT feed_url,COUNT(id) AS subscribers
                                FROM ttrss_feeds WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf 
                                        WHERE tf.feed_url = ttrss_feeds.feed_url 
                                                AND owner_uid = '$owner_uid') GROUP BY feed_url 
-                                                       ORDER BY subscribers DESC LIMIT 25");
+                                               ORDER BY subscribers DESC LIMIT 25"); */
+
+                       $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 
+                               AND owner_uid = '$owner_uid') ORDER BY subscribers DESC LIMIT 25");
 
                        print "<ul class='browseFeedList' id='browseFeedList'>";