Fix name when adding contact
This commit is contained in:
parent
7e0da0cb25
commit
bc54f13636
1 changed files with 2 additions and 1 deletions
|
@ -44,9 +44,10 @@ $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID()));
|
||||||
$id = OC_Contacts_VCard::add($aid,$vcard->serialize());
|
$id = OC_Contacts_VCard::add($aid,$vcard->serialize());
|
||||||
|
|
||||||
$details = OC_Contacts_VCard::structureContact($vcard);
|
$details = OC_Contacts_VCard::structureContact($vcard);
|
||||||
|
$name = $details['FN'][0]['value'];
|
||||||
$tmpl = new OC_Template('contacts','part.details');
|
$tmpl = new OC_Template('contacts','part.details');
|
||||||
$tmpl->assign('details',$details);
|
$tmpl->assign('details',$details);
|
||||||
$tmpl->assign('id',$id);
|
$tmpl->assign('id',$id);
|
||||||
$page = $tmpl->fetchPage();
|
$page = $tmpl->fetchPage();
|
||||||
|
|
||||||
OC_JSON::success(array('data' => array( 'id' => $id, 'page' => $page )));
|
OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page )));
|
||||||
|
|
Loading…
Reference in a new issue