From b5966041be46ab7a16dc1ee93b5a07c5461bc73c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 13 Sep 2017 20:40:01 -0700 Subject: more zot6 --- include/connections.php | 15 +++++++++++---- include/zot.php | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/connections.php b/include/connections.php index a9f906649..0cf4cdc5a 100644 --- a/include/connections.php +++ b/include/connections.php @@ -629,13 +629,20 @@ function get_vcard_array($vc,$id) { if($vc->ADR) { foreach($vc->ADR as $adr) { $type = (($adr['TYPE']) ? vcard_translate_type((string)$adr['TYPE']) : ''); - $adrs[] = [ + $entry = [ 'type' => $type, 'address' => $adr->getParts() ]; - $last_entry = end($adrs); - if($last_entry && is_array($adrs[$last_entry]['address'])) - array_walk($adrs[$last_entry]['address'],'array_escape_tags'); + + if(is_array($entry['address'])) { + array_walk($entry['address'],'array_escape_tags'); + } + else { + $entry['address'] = (string) escape_tags($entry['address']); + } + + $adrs[] = $entry; + } } diff --git a/include/zot.php b/include/zot.php index 7443a2dba..c819e26a5 100644 --- a/include/zot.php +++ b/include/zot.php @@ -4188,6 +4188,7 @@ function zot_site_info($channel = null) { $ret['site']['url'] = z_root(); $ret['site']['url_sig'] = base64url_encode(rsa_sign(z_root(),$signing_key,$sig_method)); $ret['site']['zot_auth'] = z_root() . '/magic'; + $ret['site']['key'] = get_config('system','pubkey'); $dirmode = get_config('system','directory_mode'); if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL)) -- cgit v1.2.3