aboutsummaryrefslogtreecommitdiffstats
path: root/mod
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
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')
-rw-r--r--mod/directory.php2
-rw-r--r--mod/dirsearch.php6
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 ";