Skip to content
Snippets Groups Projects
Commit bc54f136 authored by Bart Visscher's avatar Bart Visscher
Browse files

Fix name when adding contact

parent 7e0da0cb
No related branches found
No related tags found
No related merge requests found
......@@ -44,9 +44,10 @@ $vcard->add(new Sabre_VObject_Property('UID',OC_Contacts_VCard::createUID()));
$id = OC_Contacts_VCard::add($aid,$vcard->serialize());
$details = OC_Contacts_VCard::structureContact($vcard);
$name = $details['FN'][0]['value'];
$tmpl = new OC_Template('contacts','part.details');
$tmpl->assign('details',$details);
$tmpl->assign('id',$id);
$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 )));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment