$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;
}
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";
$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];
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" */
dojoType="dijit.form.Select" name="order_by">
<option selected="selected" value="default"><?php echo __('Default') ?></option>
<option value="date_reverse"><?php echo __('Oldest first') ?></option>
+ <option value="feed_dates"><?php echo __('Newest first') ?></option>
</select>
<!-- deprecated -->