aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dirsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-06 17:15:41 -0700
committerfriendica <info@friendica.com>2013-08-06 17:15:41 -0700
commit99bd0712b6170b337de6d1c31db7c66ad8a18767 (patch)
tree88c84722833fa1deeea20efc4e1cac3e2f49a0bc /mod/dirsearch.php
parent687ea0ca249b20f790be2dcedc1ca8d60a76135d (diff)
downloadvolse-hubzilla-99bd0712b6170b337de6d1c31db7c66ad8a18767.tar.gz
volse-hubzilla-99bd0712b6170b337de6d1c31db7c66ad8a18767.tar.bz2
volse-hubzilla-99bd0712b6170b337de6d1c31db7c66ad8a18767.zip
Add a site access policy (to determine if this is really a public site or just an open site) and add an orphan flag to xchans in case all their hublocs go away. Get rid of a couple of DO NOT EDIT template messages which were still lurking in the tree.
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r--mod/dirsearch.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 6d6ef7434..524f55cc1 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -95,8 +95,9 @@ function dirsearch_content(&$a) {
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 $logic $sql_extra and not ( xchan_flags & %d) ",
- intval(XCHAN_FLAGS_HIDDEN)
+ $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) and not ( xchan_flags & %d ) ",
+ intval(XCHAN_FLAGS_HIDDEN),
+ intval(XCHAN_FLAGS_ORPHAN)
);
if($r) {
$ret['total_items'] = $r[0]['total'];
@@ -118,8 +119,9 @@ function dirsearch_content(&$a) {
- $r = q("SELECT xchan.*, xprof.*, updates.* from xchan left join xprof on xchan_hash = xprof_hash left join updates on xchan_hash = ud_hash where $logic $sql_extra and not ( xchan_flags & %d ) $order $qlimit ",
- intval(XCHAN_FLAGS_HIDDEN)
+ $r = q("SELECT xchan.*, xprof.*, updates.* from xchan left join xprof on xchan_hash = xprof_hash left join updates on xchan_hash = ud_hash where $logic $sql_extra and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $order $qlimit ",
+ intval(XCHAN_FLAGS_HIDDEN),
+ intval(XCHAN_FLAGS_ORPHAN)
);
$ret['page'] = $page + 1;