diff options
author | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-12-08 13:31:34 +0000 |
---|---|---|
committer | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-12-08 13:31:34 +0000 |
commit | 99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9 (patch) | |
tree | 23718e4d20c53c875111362601d4d07d2c17b644 /mod | |
parent | a007426965490fd7251cd917f1219bfc6bdf557b (diff) | |
parent | 647311db3eab87cfe15747765485df782abfa657 (diff) | |
download | volse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.tar.gz volse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.tar.bz2 volse-hubzilla-99b5bef68eff4bc7b3a36b7626ec6aa1d936e5d9.zip |
Merge pull request #723 from pafcu/diropts
Directory sorting as a dropdown, forum filter as checkbox, option to sor...
Diffstat (limited to 'mod')
-rw-r--r-- | mod/directory.php | 2 | ||||
-rw-r--r-- | mod/dirsearch.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mod/directory.php b/mod/directory.php index c06a14d9e..47849e6ba 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -100,8 +100,6 @@ function directory_content(&$a) { $query .= '&pubforums=' . intval($pubforums); $sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : ''); - if($pubforums) - $sort_order = 'normal'; if($sort_order) $query .= '&order=' . urlencode($sort_order); diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 1ecf33393..a88db0a2c 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -64,7 +64,7 @@ function dirsearch_content(&$a) { $agege = ((x($_REQUEST,'agege')) ? intval($_REQUEST['agege']) : 0 ); $agele = ((x($_REQUEST,'agele')) ? intval($_REQUEST['agele']) : 0 ); $kw = ((x($_REQUEST,'kw')) ? intval($_REQUEST['kw']) : 0 ); - $forums = ((array_key_exists('pubforums',$_REQUEST)) ? intval($_REQUEST['pubforums']) : null); + $forums = ((array_key_exists('pubforums',$_REQUEST)) ? intval($_REQUEST['pubforums']) : 0); @@ -111,7 +111,7 @@ function dirsearch_content(&$a) { if($keywords) $sql_extra .= dir_query_build($joiner,'xprof_keywords',$keywords); - if(! is_null($forums)) + if($forums) $sql_extra .= dir_flag_build($joiner,'xprof_flags',XCHAN_FLAGS_PUBFORUM, $forums); @@ -183,6 +183,8 @@ function dirsearch_content(&$a) { $order = " order by xchan_name asc "; elseif($sort_order == 'reverse') $order = " order by xchan_name desc "; + elseif($sort_order == 'reversedate') + $order = " order by xchan_name_date asc "; else $order = " order by xchan_name_date desc "; |