]> git.wh0rd.org Git - tt-rss.git/commitdiff
published and starred feeds: allow reversing headlines
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Mar 2013 05:02:23 +0000 (09:02 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Mar 2013 05:02:23 +0000 (09:02 +0400)
include/functions.php

index 1c4389ece34b5181a4864ada9a53ba0a59bb57a9..452bc2ba509b583b4cf2256f8f7825ceb44809a2 100644 (file)
                                $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
 
                                        $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,";