]> git.wh0rd.org Git - tt-rss.git/commitdiff
generated feeds always sorted by updated desc
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 1 Aug 2006 05:04:31 +0000 (06:04 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 1 Aug 2006 05:04:31 +0000 (06:04 +0100)
backend.php
functions.php

index 73bcea6a92ec99415d3d1d385425e420c977afe6..1aa0f3937913f99943a3c92d7e726208a698523e 100644 (file)
                                $search_q = "&q=$search&m=$match_on&smode=$search_mode";
                        }
 
-                       print "&nbsp;
-                               <a target=\"_new\" 
-                                       href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\"
-                                       <img class=\"noborder\" 
-                                               alt=\"Generated feed\" src=\"images/feed-icon-12x12.png\">
-                               </a>";
+                       if (!$bottom) {
+                               print "&nbsp;
+                                       <a target=\"_new\" 
+                                               href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\"
+                                               <img class=\"noborder\" 
+                                                       alt=\"Generated feed\" src=\"images/feed-icon-12x12.png\">
+                                       </a>";
+                       }
                                
                        print "</td>";
                        print "</tr></table>";
index e0f2cd5ee767c23c4b86114f37ffe2218c8928f2..987b8c9bc4cdd1845809aa41de1def00f4a0a15e 100644 (file)
                print "</runtime-info>";
        }
 
-       function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on) {
+       function queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view, $search, $search_mode, $match_on, $override_order = false) {
 
                        if ($search) {
                        
                        } else {        
                                $order_by = "updated DESC";
                        }
+
+                       if ($override_order) {
+                               $order_by = $override_order;
+                       }
        
                        $feed_title = "";
 
                $search, $search_mode, $match_on) {
 
                $qfh_ret = queryFeedHeadlines($link, $feed, 
-                               30, false, $is_cat, $search, $search_mode, $match_on);
+                               30, false, $is_cat, $search, $search_mode, $match_on, "updated DESC");
 
                $result = $qfh_ret[0];
                $feed_title = htmlspecialchars($qfh_ret[1]);