diff options
author | friendica <info@friendica.com> | 2013-01-22 00:20:25 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-22 00:20:25 -0800 |
commit | bda4ca4c0d9f247675f4c241ecb0d402bb380d8f (patch) | |
tree | 20c00db16790b04f61d33934489b38848e7accd2 /mod/dirsearch.php | |
parent | fb76675a28b37b7281546373671d0dabbd69ef46 (diff) | |
download | volse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.tar.gz volse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.tar.bz2 volse-hubzilla-bda4ca4c0d9f247675f4c241ecb0d402bb380d8f.zip |
hidden directory entries
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index b3893afe7..57132519c 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -74,12 +74,16 @@ function dirsearch_content(&$a) { // If &return_total=1, we count matching entries and return that as 'total_items' for use in pagination. // By default we return one page (default 80 items maximum) and do not count total entries + $logic = ((strlen($sql_extra)) ? 0 : 1); + if($limit) $qlimit = " LIMIT $limit "; else { $qlimit = " LIMIT " . intval($startrec) . " , " . intval($perpage); if($return_total) { - $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where 1 $sql_extra"); + $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and not ( xchan_flags & %d) ", + intval(XCHAN_FLAGS_HIDDEN) + ); if($r) { $ret['total_items'] = $r[0]['total']; } @@ -87,9 +91,10 @@ function dirsearch_content(&$a) { } $order = " ORDER BY `xchan_name` ASC "; - $logic = ((strlen($sql_extra)) ? 0 : 1); - $r = q("SELECT xchan.*, xprof.* from xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra $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 ) $order $qlimit ", + intval(XCHAN_FLAGS_HIDDEN) + ); $ret['page'] = $page + 1; $ret['records'] = count($r); |