aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-19 23:04:14 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-19 23:04:14 -0700
commit9cc8b44579ad0620d79c675b3449461db8d4e732 (patch)
tree1832d87cac5ad4381faa92fb90ace07c4899c724 /mod
parent4383564777c84408880432d2ebd9c5ac73d8afe9 (diff)
downloadvolse-hubzilla-9cc8b44579ad0620d79c675b3449461db8d4e732.tar.gz
volse-hubzilla-9cc8b44579ad0620d79c675b3449461db8d4e732.tar.bz2
volse-hubzilla-9cc8b44579ad0620d79c675b3449461db8d4e732.zip
issue #157, provide default directory sort order
Diffstat (limited to 'mod')
-rw-r--r--mod/directory.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/directory.php b/mod/directory.php
index 38dd9687a..3e94d6395 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -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);