diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-02-12 15:55:36 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-02-12 15:55:36 +0100 |
commit | 6eb1427ac07bab9052610b32b4c5df0486d5e554 (patch) | |
tree | 0d5e50527edb8b5333bc31bda9d68986d2fd5c13 /apps/contacts/export.php | |
parent | b77132edbedfc20b975c108989c3f2ff3c8c8df6 (diff) | |
download | nextcloud-server-6eb1427ac07bab9052610b32b4c5df0486d5e554.tar.gz nextcloud-server-6eb1427ac07bab9052610b32b4c5df0486d5e554.zip |
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
Diffstat (limited to 'apps/contacts/export.php')
-rw-r--r-- | apps/contacts/export.php | 10 |
1 files changed, 0 insertions, 10 deletions
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']; |