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

Contacts: Add new multiproperty if it doesn't exist.

This commit is contained in:
Thomas Tanghus 2013-03-29 16:44:44 +01:00
parent 09054d06e3
commit feeb686482

View File

@ -393,7 +393,12 @@ class Contact extends VObject\VCard implements IPIMObject {
* @return string new checksum
*/
public function setPropertyByChecksum($checksum, $name, $value, $parameters=array()) {
$property = $this->getPropertyByChecksum($checksum);
if($checksum === 'new') {
$property = Property::create($name);
$this->add($property);
} else {
$property = $this->getPropertyByChecksum($checksum);
}
switch($name) {
case 'EMAIL':
$value = strtolower($value);