allow update of fn and initial setting from channel name
This commit is contained in:
parent
493aa9f20d
commit
a270ca5101
@ -657,6 +657,9 @@ class Connedit extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$vctmp = (($vc) ? \Sabre\VObject\Reader::read($vc) : null);
|
$vctmp = (($vc) ? \Sabre\VObject\Reader::read($vc) : null);
|
||||||
$vcard = (($vctmp) ? get_vcard_array($vctmp,$contact['abook_id']) : [] );
|
$vcard = (($vctmp) ? get_vcard_array($vctmp,$contact['abook_id']) : [] );
|
||||||
|
if(! $vcard)
|
||||||
|
$vcard['fn'] = $contact['xchan_name'];
|
||||||
|
|
||||||
|
|
||||||
$tpl = get_markup_template("abook_edit.tpl");
|
$tpl = get_markup_template("abook_edit.tpl");
|
||||||
|
|
||||||
|
@ -640,6 +640,11 @@ function update_vcard($arr,$vcard = null) {
|
|||||||
'N' => array_reverse(explode(' ', $fn))
|
'N' => array_reverse(explode(' ', $fn))
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$vcard->FN = $fn;
|
||||||
|
$vcard->N = array_reverse(explode(' ', $fn));
|
||||||
|
}
|
||||||
|
|
||||||
$org = $arr['org'];
|
$org = $arr['org'];
|
||||||
if($org) {
|
if($org) {
|
||||||
$vcard->ORG = $org;
|
$vcard->ORG = $org;
|
||||||
|
Reference in New Issue
Block a user