disable SORT_HEADLINES_BY_FEED_DATE; replace with a toolbar newest first order
This commit is contained in:
parent
b9a06a0e39
commit
8aa01d7989
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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" */
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@
|
|||
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 -->
|
||||
|
|
Loading…
Reference in New Issue