From: Andrew Dolgov Date: Tue, 26 Mar 2013 05:02:23 +0000 (+0400) Subject: published and starred feeds: allow reversing headlines X-Git-Tag: 1.7.6~280 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1bd7413f6aeec49a4d248541ba5a52015d1bd524;p=tt-rss.git published and starred feeds: allow reversing headlines --- 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,";