mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Fix NOTE also on add, not just save.
This commit is contained in:
parent
65c59b6c9d
commit
0101088e95
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user