hide detailed site information if you're off the grid.

This commit is contained in:
friendica 2013-07-24 20:53:28 -07:00
parent c5d456af9b
commit 1a624c10aa

View File

@ -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);
}