aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-20 19:36:01 -0700
committerfriendica <info@friendica.com>2014-08-20 19:36:01 -0700
commitb8a5b7a610fa940297b4bd3f66c912c3f3e7e161 (patch)
treec36add3813c461e6cbf81a04c76940c758bcfd4d /mod
parenta169e5c4f3b54003a6a4dfaf61269eb18f34f17a (diff)
downloadvolse-hubzilla-b8a5b7a610fa940297b4bd3f66c912c3f3e7e161.tar.gz
volse-hubzilla-b8a5b7a610fa940297b4bd3f66c912c3f3e7e161.tar.bz2
volse-hubzilla-b8a5b7a610fa940297b4bd3f66c912c3f3e7e161.zip
restrict returned directory contents to xchans in the zot network. We could probably add other networks to this and create a distributed directory for the free web. It's highly unlikely we would do this but we *could*.
Diffstat (limited to 'mod')
-rw-r--r--mod/dirsearch.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index b72d303b7..96e576a19 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -154,7 +154,7 @@ 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) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql ",
+ $r = q("SELECT COUNT(xchan_hash) AS `total` FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and xchan_network = 'zot' and not ( xchan_flags & %d) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql ",
intval(XCHAN_FLAGS_HIDDEN),
intval(XCHAN_FLAGS_ORPHAN),
intval(XCHAN_FLAGS_DELETED)
@@ -199,7 +199,7 @@ 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 ) 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 xchan_network = 'zot' and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) and not ( xchan_flags & %d ) $safesql $order $qlimit ",
intval(XCHAN_FLAGS_HIDDEN),
intval(XCHAN_FLAGS_ORPHAN),
intval(XCHAN_FLAGS_DELETED)