From 3f7e6cd005dc44e7f64ef02f9b462f0fecba11e7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 5 Feb 2008 08:42:00 +0100 Subject: [PATCH] feed browser: prefer updated feeds when possible --- modules/pref-feed-browser.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.39.5