1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-19 08:52:22 +01:00

Make some apps compatible

This commit is contained in:
Lukas Reschke 2012-06-11 19:07:51 +02:00
parent d16432d789
commit d9625f77ef
2 changed files with 12 additions and 3 deletions

View File

@ -82,6 +82,7 @@ if(is_array($value)) {
$value = strip_tags($value);
}
/* preprocessing value */
switch($name) {
case 'BDAY':
$date = New DateTime($value);
@ -94,6 +95,8 @@ switch($name) {
case 'N':
case 'ORG':
case 'NOTE':
$value = str_replace('\n', ' \\n', $value);
break;
case 'NICKNAME':
// TODO: Escape commas and semicolons.
break;
@ -105,8 +108,14 @@ switch($name) {
break;
}
$property = $vcard->addProperty($name, $value); //, $parameters);
switch($name) {
case 'NOTE':
$vcard->setString('NOTE', $value);
break;
default:
$property = $vcard->addProperty($name, $value); //, $parameters);
break;
}
$line = count($vcard->children) - 1;

View File

@ -8,5 +8,5 @@
}
}
?>
<li role="button" book-id="<?php echo $contact['addressbookid']; ?>" data-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo htmlspecialchars($display); ?></a></li>
<li role="button" book-id="<?php echo $contact['addressbookid']; ?>" data-id="<?php echo $contact['id']; ?>"><a href="index.php?id=<?php echo $contact['id']; ?>"><?php echo $display; ?></a></li>
<?php endforeach; ?>