issue #157, provide default directory sort order

This commit is contained in:
friendica 2015-04-19 23:04:14 -07:00
parent 4383564777
commit 9cc8b44579
2 changed files with 12 additions and 2 deletions

View File

@ -116,7 +116,13 @@ function dir_sort_links() {
// Build urls without order and pubforums so it's easy to tack on the changed value
// Probably there's an easier way to do this
$current_order = (($_REQUEST['order']) ? $_REQUEST['order'] : 'date');
$directory_sort_order = get_config('system','directory_sort_order');
if(! $directory_sort_order)
$directory_sort_order = 'date';
$current_order = (($_REQUEST['order']) ? $_REQUEST['order'] : $directory_sort_order);
$url = 'directory?f=';
$tmp = array_merge($_GET,$_POST);

View File

@ -158,7 +158,11 @@ function directory_content(&$a) {
if(! is_null($pubforums))
$query .= '&pubforums=' . intval($pubforums);
$sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : 'date');
$directory_sort_order = get_config('system','directory_sort_order');
if(! $directory_sort_order)
$directory_sort_order = 'date';
$sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : $directory_sort_order);
if($sort_order)
$query .= '&order=' . urlencode($sort_order);