aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-10-07 21:59:18 +0200
committerBart Visscher <bartv@thisnet.nl>2011-10-07 21:59:25 +0200
commitbc54f136364b20a0ea8cb1ed95802646daa2f81e (patch)
tree5a5f702c35b0c08871e84b4d2f35c6a8f5636670
parent7e0da0cb253f472e17253579730fbbee67bcf643 (diff)
downloadnextcloud-server-bc54f136364b20a0ea8cb1ed95802646daa2f81e.tar.gz
nextcloud-server-bc54f136364b20a0ea8cb1ed95802646daa2f81e.zip
Fix name when adding contact
-rw-r--r--apps/contacts/ajax/addcard.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/contacts/ajax/addcard.php b/apps/contacts/ajax/addcard.php
index ee95513732d..70e0f0a89d0 100644
--- a/apps/contacts/ajax/addcard.php
+++ b/apps/contacts/ajax/addcard.php
@@ -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 )));