diff options
author | friendica <info@friendica.com> | 2015-02-24 16:36:27 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-24 16:36:27 -0800 |
commit | 08f054130f5a57e2928e129131e7609271ec7f40 (patch) | |
tree | e4eb2166044c05f750c78fc30742835ae5294f44 /mod/directory.php | |
parent | 11df605c2e065e123e58bd73525e7ca2113f40b8 (diff) | |
download | volse-hubzilla-08f054130f5a57e2928e129131e7609271ec7f40.tar.gz volse-hubzilla-08f054130f5a57e2928e129131e7609271ec7f40.tar.bz2 volse-hubzilla-08f054130f5a57e2928e129131e7609271ec7f40.zip |
require access token to view, query, or join directories in private realms, if the realm is so configured.
Diffstat (limited to 'mod/directory.php')
-rw-r--r-- | mod/directory.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/directory.php b/mod/directory.php index 329e255cf..bc5aa41e2 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -92,6 +92,9 @@ function directory_content(&$a) { $url = $directory['url'] . '/dirsearch'; } + $token = get_config('system','realm_token'); + + logger('mod_directory: URL = ' . $url, LOGGER_DEBUG); $contacts = array(); @@ -106,8 +109,6 @@ function directory_content(&$a) { } } - - if($url) { // We might want to make the tagadelic count (&kw=) configurable or turn it off completely. @@ -116,6 +117,9 @@ function directory_content(&$a) { $kw = ((intval($numtags)) ? $numtags : 24); $query = $url . '?f=&kw=' . $kw . (($safe_mode != 1) ? '&safe=' . $safe_mode : ''); + if($token) + $query .= '&t=' . $token; + if($search) $query .= '&name=' . urlencode($search) . '&keywords=' . urlencode($search); if(strpos($search,'@')) |