PreRelease fixes

This commit is contained in:
RainLoop Team 2015-07-05 22:06:19 +04:00
parent 34a9b8cbc5
commit 42bac6aa2f
55 changed files with 578 additions and 238 deletions

View file

@ -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);
}
}