From a6adb136fd366d4e0d417a79bb41a0b4d2578efb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 25 Mar 2013 22:41:22 +0400 Subject: [PATCH] revert to previous adaptive behavior --- include/functions.php | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/include/functions.php b/include/functions.php index 93fa7cc0..fd92348b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2237,40 +2237,14 @@ $view_query_part = " "; } else if ($feed != -1) { - if (defined('_CLASSIC_ADAPTIVE')) { + $unread = getFeedUnread($link, $feed, $cat_view); - $unread = getFeedUnread($link, $feed, $cat_view); + if ($cat_view && $feed > 0 && $include_children) + $unread += getCategoryChildrenUnread($link, $feed); - if ($cat_view && $feed > 0 && $include_children) - $unread += getCategoryChildrenUnread($link, $feed); + if ($unread > 0) + $view_query_part = " unread = true AND "; - if ($unread > 0) - $view_query_part = " unread = true AND "; - - } else { - - if (get_pref($link, "SORT_HEADLINES_BY_FEED_DATE", $owner_uid)) { - $a_date_sort_field = "updated"; - } else { - $a_date_sort_field = "date_entered"; - } - - if (get_pref($link, 'REVERSE_HEADLINES', $owner_uid)) { - $a_order_by = "$a_date_sort_field"; - } else { - $a_order_by = "$a_date_sort_field DESC"; - } - - if (!$override_order) { - $override_order = "unread DESC, $a_order_by"; - } - - if (!$ignore_vfeed_group && ($is_cat || $feed_id < 0) && - get_pref($link, 'VFEED_GROUP_BY_FEED', $owner_uid)) { - - $override_order = "ttrss_feeds.title, $override_order"; - } - } } } -- 2.39.5