diff --git a/classes/feeds.php b/classes/feeds.php index 6aca206a..fcac6e4d 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -862,15 +862,12 @@ class Feeds extends Handler_Protected { $override_order = false; - if (get_pref($this->link, "SORT_HEADLINES_BY_FEED_DATE", $owner_uid)) { - $date_sort_field = "updated"; - } else { - $date_sort_field = "date_entered"; - } - switch ($order_by) { case "date_reverse": - $override_order = "$date_sort_field, updated"; + $override_order = "date_entered DESC, updated"; + break; + case "feed_dates": + $override_order = "updated DESC"; break; } diff --git a/classes/handler/public.php b/classes/handler/public.php index 5adb3ab6..32e40657 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -14,11 +14,7 @@ class Handler_Public extends Handler { if (!$limit) $limit = 100; - if (get_pref($this->link, "SORT_HEADLINES_BY_FEED_DATE", $owner_uid)) { - $date_sort_field = "updated"; - } else { - $date_sort_field = "date_entered"; - } + $date_sort_field = "date_entered DESC, updated DESC"; if ($feed == -2) $date_sort_field = "last_published"; @@ -27,7 +23,7 @@ class Handler_Public extends Handler { $qfh_ret = queryFeedHeadlines($this->link, $feed, $limit, $view_mode, $is_cat, $search, $search_mode, - "$date_sort_field DESC", $offset, $owner_uid, + $date_sort_field, $offset, $owner_uid, false, 0, false, true); $result = $qfh_ret[0]; diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index be8b9444..ad5dff4a 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -121,7 +121,8 @@ class Pref_Prefs extends Handler_Protected { global $access_level_names; - $prefs_blacklist = array("STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES"); + $prefs_blacklist = array("STRIP_UNSAFE_TAGS", "REVERSE_HEADLINES", + "SORT_HEADLINES_BY_FEED_DATE"); /* "FEEDS_SORT_BY_UNREAD", "HIDE_READ_FEEDS", "REVERSE_HEADLINES" */ diff --git a/index.php b/index.php index 963e5940..e9db16bb 100644 --- a/index.php +++ b/index.php @@ -178,6 +178,7 @@ dojoType="dijit.form.Select" name="order_by"> +