summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/addcontact.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-05-10 16:53:25 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-05-10 16:53:25 +0200
commit2c6740b0c72a4e3c66dd63e2c687d90c547b226e (patch)
treee3327e681d3c904551b3630f627d5d8b6e3f0140 /apps/contacts/ajax/addcontact.php
parentddd991a59e767c593fab7c4ea238fe8b32bd3fe7 (diff)
downloadnextcloud-server-2c6740b0c72a4e3c66dd63e2c687d90c547b226e.tar.gz
nextcloud-server-2c6740b0c72a4e3c66dd63e2c687d90c547b226e.zip
Some UI and code restructering according to usability tests: https://mail.kde.org/pipermail/owncloud/2012-May/003194.html
Diffstat (limited to 'apps/contacts/ajax/addcontact.php')
-rwxr-xr-xapps/contacts/ajax/addcontact.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php
index dc083df1fa5..ee451098f1d 100755
--- a/apps/contacts/ajax/addcontact.php
+++ b/apps/contacts/ajax/addcontact.php
@@ -45,6 +45,7 @@ if(!$aid) {
}
OC_Contacts_App::getAddressbook( $aid ); // is owner access check
+$isnew = isset($_POST['isnew'])?$_POST['isnew']:false;
$fn = trim($_POST['fn']);
$n = trim($_POST['n']);
@@ -53,7 +54,7 @@ $vcard->setUID();
$vcard->setString('FN',$fn);
$vcard->setString('N',$n);
-$id = OC_Contacts_VCard::add($aid,$vcard);
+$id = OC_Contacts_VCard::add($aid,$vcard, null, $isnew);
if(!$id) {
OCP\JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('There was an error adding the contact.'))));
OCP\Util::writeLog('contacts','ajax/addcontact.php: Recieved non-positive ID on adding card: '.$id, OCP\Util::ERROR);