aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorStefan Parviainen <saparvia@caterva.eu>2014-12-06 14:55:23 +0100
committerStefan Parviainen <saparvia@caterva.eu>2014-12-07 12:31:12 +0100
commit647311db3eab87cfe15747765485df782abfa657 (patch)
tree56628d310ca8c47cb4b18075631f7859bfa723cb /mod/dirsearch.php
parent3855be49104b6c874a1c91c7db134e642d3fda20 (diff)
downloadvolse-hubzilla-647311db3eab87cfe15747765485df782abfa657.tar.gz
volse-hubzilla-647311db3eab87cfe15747765485df782abfa657.tar.bz2
volse-hubzilla-647311db3eab87cfe15747765485df782abfa657.zip
Directory sorting as a dropdown, forum filter as checkbox, option to sort oldest first
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php6
1 files changed, 4 insertions, 2 deletions
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 ";