From: Andrew Dolgov Date: Wed, 17 Nov 2010 06:36:22 +0000 (+0300) Subject: outputFeedList: properly generate last category; override order for the time being X-Git-Tag: 1.5.0~181 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=76657c46b87b66fe2bdd1fd9cf56a84016530811;p=tt-rss.git outputFeedList: properly generate last category; override order for the time being --- diff --git a/functions.php b/functions.php index e2e98455..d8e411ec 100644 --- a/functions.php +++ b/functions.php @@ -4243,7 +4243,7 @@ $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 { @@ -4255,7 +4255,12 @@ } else { $order_by_qpart = "title"; } - } + } */ + + if ($enable_cats) + $order_by_qpart = "order_id,category,title"; + else + $order_by_qpart = "title"; $age_qpart = getMaxAgeSubquery(); @@ -4322,7 +4327,9 @@ $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']); }