diff options
author | Thomas Willingham <founder@kakste.com> | 2012-12-20 19:14:54 +0000 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2012-12-20 19:14:54 +0000 |
commit | e31600f24f45eca378759918f2a50d6446b05764 (patch) | |
tree | 5cd8cf31b6f9ec2e86d1caea13943ae73b71b032 /mod/zfinger.php | |
parent | 6715c400be1c13dde04294e39de12667421b0382 (diff) | |
parent | e091d30ca4d057e810864b1ba2351b9c050ad548 (diff) | |
download | volse-hubzilla-e31600f24f45eca378759918f2a50d6446b05764.tar.gz volse-hubzilla-e31600f24f45eca378759918f2a50d6446b05764.tar.bz2 volse-hubzilla-e31600f24f45eca378759918f2a50d6446b05764.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r-- | mod/zfinger.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php index e1afdeba4..b51bf7900 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -58,6 +58,9 @@ function zfinger_init(&$a) { $id = $e['channel_id']; + $searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true); + + // This is for birthdays and keywords, but must check access permissions // $r = q("select contact.*, profile.* // from contact left join profile on contact.uid = profile.uid @@ -86,6 +89,7 @@ function zfinger_init(&$a) { $ret['name_updated'] = $e['xchan_name_date']; $ret['target'] = $ztarget; $ret['target_sig'] = $zsig; + $ret['searchable'] = $searchable; // FIXME encrypt permissions when targeted so that only the target can view them, requires sending the pubkey and also checking that the target_sig is signed with that pubkey and isn't a forgery. @@ -119,6 +123,20 @@ function zfinger_init(&$a) { } } + $ret['site'] = array(); + $ret['site']['url'] = z_root(); + $dirmode = get_config('system','directory_mode'); + if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL)) + $ret['site']['directory_mode'] = 'normal'; + if($dirmode == DIRECTORY_MODE_PRIMARY) + $ret['site']['directory_mode'] = 'primary'; + elseif($dirmode == DIRECTORY_MODE_SECONDARY) + $ret['site']['directory_mode'] = 'secondary'; + elseif($dirmode == DIRECTORY_MODE_STANDALONE) + $ret['site']['directory_mode'] = 'standalone'; + if($dirmode != DIRECTORY_MODE_NORMAL) + $ret['site']['directory_url'] = z_root() . '/dir'; + json_return_and_die($ret); }
\ No newline at end of file |