summaryrefslogtreecommitdiffstats
path: root/apps/contacts/ajax/deletebook.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2011-12-09 15:25:26 +0100
committerThomas Tanghus <thomas@tanghus.net>2011-12-09 15:25:26 +0100
commit7aa8eb3427679366905840b80a69e36344a5632d (patch)
tree347a2100ad445620ed21b17f9faa90fe0edb3874 /apps/contacts/ajax/deletebook.php
parentb3661adf028570f6158dfd5092ecb1398d5be0df (diff)
parenteeaf539a4414e3081b6f6652167363a3221a1973 (diff)
downloadnextcloud-server-7aa8eb3427679366905840b80a69e36344a5632d.tar.gz
nextcloud-server-7aa8eb3427679366905840b80a69e36344a5632d.zip
Merge git://gitorious.org/owncloud/owncloud into tanghus_remote_backup
Conflicts: apps/contacts/ajax/deletebook.php apps/contacts/index.php
Diffstat (limited to 'apps/contacts/ajax/deletebook.php')
-rw-r--r--apps/contacts/ajax/deletebook.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/apps/contacts/ajax/deletebook.php b/apps/contacts/ajax/deletebook.php
index 238975436e7..a89c00575e9 100644
--- a/apps/contacts/ajax/deletebook.php
+++ b/apps/contacts/ajax/deletebook.php
@@ -23,21 +23,14 @@
// Init owncloud
require_once('../../../lib/base.php');
-$id = $_POST['id'];
-
-OC_Log::write('contacts','deletebook.php: '.$id,OC_Log::DEBUG);
-
$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 )));