aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/dir_fns.php8
-rw-r--r--mod/directory.php6
2 files changed, 12 insertions, 2 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index d1e26b637..ebaa7c427 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -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);
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);