hide detailed site information if you're off the grid.
This commit is contained in:
parent
c5d456af9b
commit
1a624c10aa
@ -186,7 +186,15 @@ function zfinger_init(&$a) {
|
||||
$ret['site']['directory_mode'] = 'standalone';
|
||||
if($dirmode != DIRECTORY_MODE_NORMAL)
|
||||
$ret['site']['directory_url'] = z_root() . '/dirsearch';
|
||||
|
||||
|
||||
// hide detailed site information if you're off the grid
|
||||
|
||||
if($dirmode != DIRECTORY_MODE_STANDALONE) {
|
||||
|
||||
$register_policy = intval(get_config('system','register_policy'));
|
||||
|
||||
|
||||
if($register_policy == REGISTER_CLOSED)
|
||||
$ret['site']['register_policy'] = 'closed';
|
||||
if($register_policy == REGISTER_APPROVE)
|
||||
@ -217,6 +225,7 @@ function zfinger_init(&$a) {
|
||||
$ret['site']['sitehash'] = get_config('system','location_hash');
|
||||
$ret['site']['sitename'] = get_config('system','sitename');
|
||||
|
||||
}
|
||||
json_return_and_die($ret);
|
||||
|
||||
}
|
Reference in New Issue
Block a user