allow update of fn and initial setting from channel name

This commit is contained in:
zotlabs 2016-12-20 19:31:50 -08:00
parent 493aa9f20d
commit a270ca5101
2 changed files with 8 additions and 0 deletions

View File

@ -657,6 +657,9 @@ class Connedit extends \Zotlabs\Web\Controller {
$vctmp = (($vc) ? \Sabre\VObject\Reader::read($vc) : null);
$vcard = (($vctmp) ? get_vcard_array($vctmp,$contact['abook_id']) : [] );
if(! $vcard)
$vcard['fn'] = $contact['xchan_name'];
$tpl = get_markup_template("abook_edit.tpl");

View File

@ -640,6 +640,11 @@ function update_vcard($arr,$vcard = null) {
'N' => array_reverse(explode(' ', $fn))
]);
}
else {
$vcard->FN = $fn;
$vcard->N = array_reverse(explode(' ', $fn));
}
$org = $arr['org'];
if($org) {
$vcard->ORG = $org;