From 1bd7413f6aeec49a4d248541ba5a52015d1bd524 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 26 Mar 2013 09:02:23 +0400 Subject: [PATCH] published and starred feeds: allow reversing headlines --- include/functions.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index 1c4389ec..452bc2ba 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2336,7 +2336,13 @@ $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; $allow_archived = true; - if (!$override_order) $override_order = "last_marked DESC, updated DESC"; + if (!$override_order) { + if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) { + $override_order = "date_entered"; + } else { + $override_order = "last_marked DESC, date_entered DESC"; + } + } } else if ($feed == -2) { // published virtual feed OR labels category @@ -2345,7 +2351,14 @@ $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; $allow_archived = true; - if (!$override_order) $override_order = "last_published DESC, updated DESC"; + if (!$override_order) { + if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) { + $override_order = "date_entered"; + } else { + $override_order = "last_published DESC, date_entered DESC"; + } + } + } else { $vfeed_query_part = "ttrss_feeds.title AS feed_title,"; -- 2.39.5