]> git.wh0rd.org Git - tt-rss.git/commitdiff
feedbrowser UI fixes
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 09:42:56 +0000 (10:42 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 09:42:56 +0000 (10:42 +0100)
modules/pref-feed-browser.php
update_feedbrowser.php

index 7b1414bc25ed21d7e7fce13495f71d50a7cd2be8..994245ed6362fef9fb263869452a47ea09f13424 100644 (file)
                $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')");
+                       AND owner_uid = '$owner_uid') ORDER BY subscribers DESC LIMIT $limit");
 
                print "<br/>";
                        
index 607490683f87ea23678747da473fb796e63e3c22..b64bb2569e771fb140f0c1c26f20dfe8111bff03 100644 (file)
@@ -48,6 +48,8 @@
 
        db_query($link, "DELETE FROM ttrss_feedbrowser_cache");
 
+       $count = 0;
+
        while ($line = db_fetch_assoc($result)) {
                $subscribers = db_escape_string($line["subscribers"]);
                $feed_url = db_escape_string($line["feed_url"]);
                db_query($link, "INSERT INTO ttrss_feedbrowser_cache 
                        (feed_url, subscribers) VALUES ('$feed_url', '$subscribers')");
 
+               ++$count;
        }
 
        db_query($link, "COMMIT");
 
+       print "Finished, $count feeds processed.\n";
+
        db_close($link);
 
        unlink(LOCK_DIRECTORY . "/$lock_filename");