diff options
author | Thomas Willingham <founder@kakste.com> | 2013-06-16 14:59:17 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-06-16 14:59:17 +0100 |
commit | 33696cc8392daeb08d011aa3b1209f3b121898ea (patch) | |
tree | 466d48f5abc1a4ec1dbf83543471a8ac89428516 /mod/dirsearch.php | |
parent | 466a6d5227fbaf0a36cd76b5603cb42bb1b7462b (diff) | |
parent | c4c80a2e472173dfed9b982c6705ccfbb6e6cdab (diff) | |
download | volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.gz volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.tar.bz2 volse-hubzilla-33696cc8392daeb08d011aa3b1209f3b121898ea.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/dirsearch.php')
-rw-r--r-- | mod/dirsearch.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php index c7fa8a9d8..5465e11ff 100644 --- a/mod/dirsearch.php +++ b/mod/dirsearch.php @@ -23,6 +23,7 @@ function dirsearch_content(&$a) { } $name = ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''); + $hub = ((x($_REQUEST,'hub')) ? $_REQUEST['hub'] : ''); $address = ((x($_REQUEST,'address')) ? $_REQUEST['address'] : ''); $locale = ((x($_REQUEST,'locale')) ? $_REQUEST['locale'] : ''); $region = ((x($_REQUEST,'region')) ? $_REQUEST['region'] : ''); @@ -38,6 +39,8 @@ function dirsearch_content(&$a) { if($name) $sql_extra .= " OR xchan_name like '" . protect_sprintf( '%' . dbesc($name) . '%' ) . "' "; + if($hub) + $sql_extra .= " OR xchan_hash in (select hubloc_hash from hubloc where hubloc_host = '" . protect_sprintf(dbesc($hub)) . "') "; if($address) $sql_extra .= " OR xchan_addr like '" . protect_sprintf( '%' . dbesc($address) . '%' ) . "' "; if($city) @@ -96,7 +99,6 @@ function dirsearch_content(&$a) { $order = " ORDER BY `xchan_name` ASC "; - $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) ); |