]> git.wh0rd.org Git - tt-rss.git/commitdiff
outputFeedList: properly generate last category; override order for the time being
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 17 Nov 2010 06:36:22 +0000 (09:36 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 17 Nov 2010 06:36:22 +0000 (09:36 +0300)
functions.php

index e2e98455800e3a39968e6f83887385370b0ea4e1..d8e411ece7f1e267aae8f6958514120d810528dd 100644 (file)
                        $feedlist['items'] = array_merge($feedlist['items'], $cat['items']);
                }
        
-               if (get_pref($link, 'ENABLE_FEED_CATS')) {
+/*             if (get_pref($link, 'ENABLE_FEED_CATS')) {
                        if (get_pref($link, "FEEDS_SORT_BY_UNREAD")) {
                                $order_by_qpart = "order_id,category,unread DESC,title";
                        } else {
                        } else {                
                                $order_by_qpart = "title";
                        }
-               }
+               } */
+
+               if ($enable_cats)
+                       $order_by_qpart = "order_id,category,title";
+               else
+                       $order_by_qpart = "title";
 
                $age_qpart = getMaxAgeSubquery();
 
                                $feed, $unread, $line['last_error'], $updated));
                }
 
-               if (!$enable_cats) {
+               if ($enable_cats) {
+                       array_push($feedlist['items'], $cat);
+               } else { 
                        $feedlist['items'] = array_merge($feedlist['items'], $cat['items']);
                }