From 6eb1427ac07bab9052610b32b4c5df0486d5e554 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 12 Feb 2012 15:55:36 +0100 Subject: Contacts: Document usage of OC_Contacts_App::getAddressbook Remove redundant access checks and add comments to the calls to OC_Contacts_App::getAddressbook that are access checks --- apps/contacts/export.php | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'apps/contacts/export.php') diff --git a/apps/contacts/export.php b/apps/contacts/export.php index fc2aa86500f..750d77bcac8 100644 --- a/apps/contacts/export.php +++ b/apps/contacts/export.php @@ -14,10 +14,6 @@ $contact = isset($_GET['contactid']) ? $_GET['contactid'] : NULL; $nl = "\n"; if(isset($book)){ $addressbook = OC_Contacts_App::getAddressbook($book); - if($addressbook['userid'] != OC_User::getUser()){ - OC_JSON::error(); - exit; - } $cardobjects = OC_Contacts_VCard::all($book); header('Content-Type: text/directory'); header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); @@ -27,12 +23,6 @@ if(isset($book)){ } }elseif(isset($contact)){ $data = OC_Contacts_App::getContactObject($contact); - $addressbookid = $data['addressbookid']; - $addressbook = OC_Contacts_App::getAddressbook($addressbookid); - if($addressbook['userid'] != OC_User::getUser()){ - OC_JSON::error(); - exit; - } header('Content-Type: text/directory'); header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $data['fullname']) . '.vcf'); echo $data['carddata']; -- cgit v1.2.3