disable SORT_HEADLINES_BY_FEED_DATE; replace with a toolbar newest first order
This commit is contained in:
parent
b9a06a0e39
commit
8aa01d7989
4 changed files with 9 additions and 14 deletions
|
@ -862,15 +862,12 @@ class Feeds extends Handler_Protected {
|
||||||
|
|
||||||
$override_order = false;
|
$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) {
|
switch ($order_by) {
|
||||||
case "date_reverse":
|
case "date_reverse":
|
||||||
$override_order = "$date_sort_field, updated";
|
$override_order = "date_entered DESC, updated";
|
||||||
|
break;
|
||||||
|
case "feed_dates":
|
||||||
|
$override_order = "updated DESC";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,7 @@ class Handler_Public extends Handler {
|
||||||
|
|
||||||
if (!$limit) $limit = 100;
|
if (!$limit) $limit = 100;
|
||||||
|
|
||||||
if (get_pref($this->link, "SORT_HEADLINES_BY_FEED_DATE", $owner_uid)) {
|
$date_sort_field = "date_entered DESC, updated DESC";
|
||||||
$date_sort_field = "updated";
|
|
||||||
} else {
|
|
||||||
$date_sort_field = "date_entered";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($feed == -2)
|
if ($feed == -2)
|
||||||
$date_sort_field = "last_published";
|
$date_sort_field = "last_published";
|
||||||
|
@ -27,7 +23,7 @@ class Handler_Public extends Handler {
|
||||||
|
|
||||||
$qfh_ret = queryFeedHeadlines($this->link, $feed,
|
$qfh_ret = queryFeedHeadlines($this->link, $feed,
|
||||||
$limit, $view_mode, $is_cat, $search, $search_mode,
|
$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);
|
false, 0, false, true);
|
||||||
|
|
||||||
$result = $qfh_ret[0];
|
$result = $qfh_ret[0];
|
||||||
|
|
|
@ -121,7 +121,8 @@ class Pref_Prefs extends Handler_Protected {
|
||||||
|
|
||||||
global $access_level_names;
|
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" */
|
/* "FEEDS_SORT_BY_UNREAD", "HIDE_READ_FEEDS", "REVERSE_HEADLINES" */
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,7 @@
|
||||||
dojoType="dijit.form.Select" name="order_by">
|
dojoType="dijit.form.Select" name="order_by">
|
||||||
<option selected="selected" value="default"><?php echo __('Default') ?></option>
|
<option selected="selected" value="default"><?php echo __('Default') ?></option>
|
||||||
<option value="date_reverse"><?php echo __('Oldest first') ?></option>
|
<option value="date_reverse"><?php echo __('Oldest first') ?></option>
|
||||||
|
<option value="feed_dates"><?php echo __('Newest first') ?></option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- deprecated -->
|
<!-- deprecated -->
|
||||||
|
|
Loading…
Reference in a new issue