]> git.wh0rd.org Git - tt-rss.git/commitdiff
order feed output by date_entered instead of updated to properly keep new stuff topmo...
authorAndrew Dolgov <fox@fakecake.org>
Mon, 18 Oct 2010 14:32:26 +0000 (18:32 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Mon, 18 Oct 2010 14:32:26 +0000 (18:32 +0400)
backend.php
functions.php

index c30629167a977ab06ad6d7989473b13ac11453bb..06c1ecbd96b20080c6581be1dbfddb41b0c349ed 100644 (file)
                        switch ($order_by) {
                                case "date":
                                        if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
-                                               $override_order = "updated";
+                                               $override_order = "date_entered";
                                        } else {        
-                                               $override_order = "updated DESC";
+                                               $override_order = "date_entered DESC";
                                        }
                                        break;
 
                                case "title":
-                                       $override_order = "updated DESC";
+                                       if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
+                                               $override_order = "title DESC, date_entered";
+                                       } else {
+                                               $override_order = "title, date_entered DESC";
+                                       }
                                        break;
 
                                case "score":
-                                       $override_order = "score DESC";
+                                       if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
+                                               $override_order = "score, date_entered";
+                                       } else {
+                                               $override_order = "score DESC, date_entered DESC";
+                                       }
                                        break;
                        }
 
index af5a64f372c3b54953bbff4c9cb0dd3bc60b1b0c..a669814dff0b4af71474b0ac2e0c145135fd419e 100644 (file)
                        }
 
                        if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) {
-                               $order_by = "updated";
+                               $order_by = "date_entered";
                        } else {        
-                               $order_by = "updated DESC";
+                               $order_by = "date_entered DESC";
                        }
 
                        if ($view_mode != "noscores") {
                if (!$limit) $limit = 30;
 
                $qfh_ret = queryFeedHeadlines($link, $feed, 
-                       $limit, false, $is_cat, $search, $search_mode, $match_on, "updated DESC", 0,
+                       $limit, false, $is_cat, $search, $search_mode, $match_on, "date_entered DESC", 0,
                        $owner_uid);
 
                $result = $qfh_ret[0];