1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

fix newline problem in contacts

This commit is contained in:
Georg Ehrke 2012-01-15 00:47:50 +01:00
parent 8d78bb73cd
commit 1fd413a6d2

View File

@ -11,6 +11,8 @@ OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$book = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
$contact = isset($_GET['contactid']) ? $_GET['contactid'] : NULL;
$nl = '
';
if(isset($book)){
$addressbook = OC_Contacts_App::getAddressbook($book);
if($addressbook['userid'] != OC_User::getUser()){
@ -22,7 +24,7 @@ if(isset($book)){
header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf');
foreach($cardobjects as $card) {
echo $card['carddata'];
echo $card['carddata'] . $nl;
}
}elseif(isset($contact)){
$data = OC_Contacts_App::getContactObject($contact);