diff options
Diffstat (limited to 'apps/contacts/ajax/addcontact.php')
-rwxr-xr-x | apps/contacts/ajax/addcontact.php | 3 |
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); |