From: Andrew Dolgov Date: Tue, 5 Feb 2008 07:42:00 +0000 (+0100) Subject: feed browser: prefer updated feeds when possible X-Git-Tag: 1.2.20~48 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3f7e6cd005dc44e7f64ef02f9b462f0fecba11e7;p=tt-rss.git feed browser: prefer updated feeds when possible --- diff --git a/modules/pref-feed-browser.php b/modules/pref-feed-browser.php index 6e4abce3..034d5120 100644 --- a/modules/pref-feed-browser.php +++ b/modules/pref-feed-browser.php @@ -121,9 +121,13 @@ while ($line = db_fetch_assoc($result)) { $feed_url = $line["feed_url"]; $subscribers = $line["subscribers"]; - + + // mysql returns NULL records first by default + if (DB_TYPE == "mysql") $order_fix = "DESC"; + $det_result = db_query($link, "SELECT site_url,title,id - FROM ttrss_feeds WHERE feed_url = '$feed_url' LIMIT 1"); + FROM ttrss_feeds WHERE feed_url = '$feed_url' + ORDER BY last_updated $order_fix LIMIT 1"); $details = db_fetch_assoc($det_result);