require access token to view, query, or join directories in private realms, if the realm is so configured.
This commit is contained in:
@@ -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,'@'))
|
||||
|
||||
Reference in New Issue
Block a user