diff options
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index 14307f274..115bc2235 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -132,7 +132,7 @@ function dirsearch_content(&$a) { if($sort_order == 'date') - $order = ""; // Not currently implemented + $order = " order by xchan_name_date desc "; elseif($sort_order == 'reverse') $order = " order by xchan_name desc "; else @@ -159,10 +159,12 @@ function dirsearch_content(&$a) { json_return_and_die($spkt); } else { - $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql $order $qlimit ", + + $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where ( $logic $sql_extra ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql $order $qlimit ", intval(XCHAN_FLAGS_HIDDEN), intval(XCHAN_FLAGS_ORPHAN) ); + } $ret['page'] = $page + 1; |