summaryrefslogtreecommitdiffstats
path: root/apps/contacts/export.php
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-01-11 03:56:53 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-01-11 04:05:30 +0100
commit1a6ad816a32eb9d4813b66457f8bcdc9c46e2141 (patch)
tree1aaae79b6e28021937364b8b02db904f041f0362 /apps/contacts/export.php
parent5500041ccab0fb7664a06ffa40fe3532d11bacb4 (diff)
downloadnextcloud-server-1a6ad816a32eb9d4813b66457f8bcdc9c46e2141.tar.gz
nextcloud-server-1a6ad816a32eb9d4813b66457f8bcdc9c46e2141.zip
CSS cleanup, more error checking, better error messages, general cleanup.
Diffstat (limited to 'apps/contacts/export.php')
-rw-r--r--apps/contacts/export.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/contacts/export.php b/apps/contacts/export.php
index fd2d7da1750..a1e974c962b 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);