. * */ function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); OC_Log::write('contacts','ajax/saveproperty.php: '.$msg, OC_Log::DEBUG); exit(); } // Init owncloud require_once('../../../lib/base.php'); // 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 )));