diff options
Diffstat (limited to 'apps/contacts/ajax/deletebook.php')
-rw-r--r-- | apps/contacts/ajax/deletebook.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/contacts/ajax/deletebook.php b/apps/contacts/ajax/deletebook.php index c13217ef2e2..a89c00575e9 100644 --- a/apps/contacts/ajax/deletebook.php +++ b/apps/contacts/ajax/deletebook.php @@ -23,19 +23,14 @@ // Init owncloud require_once('../../../lib/base.php'); -$id = $_GET['id']; - $l10n = new OC_L10N('contacts'); - // Check if we are a user OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); -$addressbook = OC_Contacts_Addressbook::find( $id ); -if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ - OC_JSON::error(array('data' => array( 'message' => $l10n->t('This is not your contact.')))); - exit(); -} +//$id = $_GET['id']; +$id = $_POST['id']; +$addressbook = OC_Contacts_App::getAddressbook( $id ); OC_Contacts_Addressbook::delete($id); OC_JSON::success(array('data' => array( 'id' => $id ))); |