X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=entry.php;h=1e5e7552976de876ee184fccb105b3866df15614;hb=80bfe0c989b5884d0133e99c36ccad7197105593;hp=c14ff2d70dfaf7ab66169b63c80a1dd269902f4b;hpb=c78202d78e276ef80e0d959e50f49d09b9ed5340;p=contagged diff --git a/entry.php b/entry.php index c14ff2d..1e5e755 100644 --- a/entry.php +++ b/entry.php @@ -71,7 +71,9 @@ if($_REQUEST['mode']=='vcf'){ $filename = $entry['givenname'].'_'.$entry['name'].'.vcf'; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-type: text/x-vcard; name=\"$filename\"; charset=utf-8"); - $smarty->display($template); + $output = $smarty->fetch($template) . "\n"; + $output = str_replace("\n", "\r\n", $output); + echo $output; }else{ header('Content-Type: text/html; charset=utf-8'); $smarty->display($template); @@ -134,9 +136,9 @@ function _saveData(){ $newdn = 'uid='.$new_uid; if (empty($_REQUEST['type'])) { $_REQUEST['type']='public'; } if($_REQUEST['type'] == 'private' && $conf['privatebook']){ - $newdn .= ', '.$conf['privatebook'].', '.$_SESSION['ldapab']['binddn']; + $newdn .= ','.$conf['privatebook'].','.$_SESSION['ldapab']['binddn']; }else{ - $newdn .= ', '.$conf['publicbook']; + $newdn .= ','.$conf['publicbook']; } $entry['displayname'] = $entry['givenname'].' '.$entry['name'];; $entry = prepare_ldap_entry($entry); @@ -150,7 +152,7 @@ print ''; if(empty($dn)){ //new entry $entry['uid'][] = $new_uid; - $r = ldap_add($LDAP_CON,$newdn,$entry); + $r = @ldap_add($LDAP_CON,$newdn,$entry); tpl_ldaperror(); return $newdn; }else{