mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +03:00
PreRelease fixes
This commit is contained in:
parent
34a9b8cbc5
commit
42bac6aa2f
55 changed files with 578 additions and 238 deletions
|
|
@ -98,6 +98,14 @@ class Property
|
|||
return PropertyType::WEB_PAGE === $this->Type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsValueForLower()
|
||||
{
|
||||
return $this->IsEmail() || $this->IsName() || $this->IsWeb();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -142,7 +150,7 @@ class Property
|
|||
}
|
||||
|
||||
// lower value for searching
|
||||
if (\MailSo\Base\Utils::FunctionExistsAndEnabled('mb_strtolower'))
|
||||
if ($this->IsValueForLower() && \MailSo\Base\Utils::FunctionExistsAndEnabled('mb_strtolower'))
|
||||
{
|
||||
$this->ValueLower = (string) @\mb_strtolower($this->Value, 'UTF-8');
|
||||
}
|
||||
|
|
@ -153,6 +161,7 @@ class Property
|
|||
$sPhone = \trim($this->Value);
|
||||
$sPhone = \preg_replace('/^[+]+/', '', $sPhone);
|
||||
$sPhone = \preg_replace('/[^\d]/', '', $sPhone);
|
||||
|
||||
$this->ValueCustom = \trim($sPhone);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue