. * */ function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); OCP\Util::writeLog('contacts','ajax/saveproperty.php: '.$msg, OCP\Util::DEBUG); exit(); } // Init owncloud // Check if we are a user OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); $id = isset($_GET['id'])?$_GET['id']:null; if(!$id) { bailOut(OC_Contacts_App::$l10n->t('id is not set.')); } $card = OC_Contacts_App::getContactObject( $id ); OC_Contacts_VCard::delete($id); OC_JSON::success(array('data' => array( 'id' => $id )));