summaryrefslogtreecommitdiffstats
path: root/apps/contacts/export.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/contacts/export.php')
-rw-r--r--apps/contacts/export.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/contacts/export.php b/apps/contacts/export.php
index fd2d7da1750..735d1c5b631 100644
--- a/apps/contacts/export.php
+++ b/apps/contacts/export.php
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
+ * Copyright (c) 2011-2012 Thomas Tanghus <thomas@tanghus.net>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@@ -20,9 +20,9 @@ if(isset($book)){
$cardobjects = OC_Contacts_VCard::all($book);
header('Content-Type: text/directory');
header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf');
- for($i = 0;$i <= count($cardobjects); $i++){
- echo $cardobjects[$i]['carddata'];
- //echo '\r\n';
+
+ foreach($cardobjects as $card) {
+ echo $card['carddata'];
}
}elseif(isset($contact)){
$data = OC_Contacts_App::getContactObject($contact);
@@ -33,7 +33,7 @@ if(isset($book)){
exit;
}
header('Content-Type: text/directory');
- header('Content-Disposition: inline; filename=' . $data['fullname'] . '.vcf');
+ header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $data['fullname']) . '.vcf');
echo $data['carddata'];
}
?>