mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-10 01:47:03 +03:00
ContactProperty and FilterCondition use reviveFromJson
This commit is contained in:
parent
9844c1882c
commit
2470f1add6
9 changed files with 78 additions and 75 deletions
|
|
@ -151,14 +151,14 @@ class Property implements \JsonSerializable
|
|||
// Simple hack
|
||||
if ($this && $this->IsWeb())
|
||||
{
|
||||
$this->Value = \preg_replace('/(skype|ftp|http[s]?)\\\:\/\//i', '$1://', $this->Value);
|
||||
$this->Value = \preg_replace('#(https?)\\\://#i', '$1://', $this->Value);
|
||||
}
|
||||
return array(
|
||||
'@Object' => 'Object/Property',
|
||||
'IdProperty' => $this->IdProperty,
|
||||
'Type' => $this->Type,
|
||||
'TypeStr' => $this->TypeStr,
|
||||
'Value' => \MailSo\Base\Utils::Utf8Clear($this->Value)
|
||||
'@Object' => 'Object/ContactProperty',
|
||||
'id' => $this->IdProperty,
|
||||
'type' => $this->Type,
|
||||
'typeStr' => $this->TypeStr,
|
||||
'value' => \MailSo\Base\Utils::Utf8Clear($this->Value)
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,11 +91,11 @@ class FilterCondition implements \JsonSerializable
|
|||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
// '@Object' => 'Object/FilterCondition',
|
||||
'Field' => $this->Field(),
|
||||
'Type' => $this->Type(),
|
||||
'Value' => $this->Value(),
|
||||
'ValueSecond' => $this->ValueSecond()
|
||||
'@Object' => 'Object/FilterCondition',
|
||||
'field' => $this->Field(),
|
||||
'type' => $this->Type(),
|
||||
'value' => $this->Value(),
|
||||
'valueSecond' => $this->ValueSecond()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue