diff options
Diffstat (limited to 'apps/contacts/ajax/addcontact.php')
-rw-r--r-- | apps/contacts/ajax/addcontact.php | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/apps/contacts/ajax/addcontact.php b/apps/contacts/ajax/addcontact.php index ee451098f1d..af9b2bbcc0e 100644 --- a/apps/contacts/ajax/addcontact.php +++ b/apps/contacts/ajax/addcontact.php @@ -20,25 +20,10 @@ * */ -// Init owncloud - -function bailOut($msg) { - OCP\JSON::error(array('data' => array('message' => $msg))); - OCP\Util::writeLog('contacts','ajax/addcontact.php: '.$msg, OCP\Util::DEBUG); - exit(); -} -function debug($msg) { - OCP\Util::writeLog('contacts','ajax/addcontact.php: '.$msg, OCP\Util::DEBUG); -} - // Check if we are a user OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('contacts'); -foreach ($_POST as $key=>$element) { - debug('_POST: '.$key.'=>'.$element); -} - $aid = isset($_POST['aid'])?$_POST['aid']:null; if(!$aid) { $aid = min(OC_Contacts_Addressbook::activeIds()); // first active addressbook. @@ -54,7 +39,7 @@ $vcard->setUID(); $vcard->setString('FN',$fn); $vcard->setString('N',$n); -$id = OC_Contacts_VCard::add($aid,$vcard, null, $isnew); +$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); |