mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-12 06:54:28 +01:00
Contacts: Add new multiproperty if it doesn't exist.
This commit is contained in:
parent
09054d06e3
commit
feeb686482
@ -393,7 +393,12 @@ class Contact extends VObject\VCard implements IPIMObject {
|
|||||||
* @return string new checksum
|
* @return string new checksum
|
||||||
*/
|
*/
|
||||||
public function setPropertyByChecksum($checksum, $name, $value, $parameters=array()) {
|
public function setPropertyByChecksum($checksum, $name, $value, $parameters=array()) {
|
||||||
|
if($checksum === 'new') {
|
||||||
|
$property = Property::create($name);
|
||||||
|
$this->add($property);
|
||||||
|
} else {
|
||||||
$property = $this->getPropertyByChecksum($checksum);
|
$property = $this->getPropertyByChecksum($checksum);
|
||||||
|
}
|
||||||
switch($name) {
|
switch($name) {
|
||||||
case 'EMAIL':
|
case 'EMAIL':
|
||||||
$value = strtolower($value);
|
$value = strtolower($value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user