diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-07-20 17:09:03 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-07-20 17:11:13 +0200 |
commit | 7fff38667953028d499f978798b44deccbd55a84 (patch) | |
tree | fb646ef3a5b71153ad09faddd9ffe9ba1b451531 /apps/contacts/export.php | |
parent | 3c2967074f0d817bff8f1d511f08aa84a9d09bde (diff) | |
download | nextcloud-server-7fff38667953028d499f978798b44deccbd55a84.tar.gz nextcloud-server-7fff38667953028d499f978798b44deccbd55a84.zip |
Code style.
Diffstat (limited to 'apps/contacts/export.php')
-rw-r--r-- | apps/contacts/export.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/contacts/export.php b/apps/contacts/export.php index eb506506c42..161ca8047ac 100644 --- a/apps/contacts/export.php +++ b/apps/contacts/export.php @@ -9,26 +9,30 @@ OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('contacts'); -$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL; -$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL; +$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : null; +$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : null; $nl = "\n"; -if(isset($bookid)){ +if(isset($bookid)) { $addressbook = OC_Contacts_App::getAddressbook($bookid); //$cardobjects = OC_Contacts_VCard::all($bookid); header('Content-Type: text/directory'); - header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); + header('Content-Disposition: inline; filename=' + . str_replace(' ', '_', $addressbook['displayname']) . '.vcf'); $start = 0; - $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20); + $batchsize = OCP\Config::getUserValue(OCP\User::getUser(), + 'contacts', + 'export_batch_size', 20); while($cardobjects = OC_Contacts_VCard::all($bookid, $start, $batchsize)){ foreach($cardobjects as $card) { echo $card['carddata'] . $nl; } $start += $batchsize; } -}elseif(isset($contactid)){ +}elseif(isset($contactid)) { $data = OC_Contacts_App::getContactObject($contactid); header('Content-Type: text/vcard'); - header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $data['fullname']) . '.vcf'); + header('Content-Disposition: inline; filename=' + . str_replace(' ', '_', $data['fullname']) . '.vcf'); echo $data['carddata']; } |