Fix name when adding contact

This commit is contained in:
Bart Visscher 2011-10-07 21:59:18 +02:00
parent 7e0da0cb25
commit bc54f13636
1 changed files with 2 additions and 1 deletions

View File

@ -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 )));