mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1895,6 +1895,11 @@ SQLITEINITIAL;
|
|||
1 => $this->getInitialTablesArray($this->sDsnType),
|
||||
2 => array(
|
||||
'ALTER TABLE rainloop_ab_properties ADD prop_value_lower varchar(255) NOT NULL DEFAULT \'\' AFTER prop_value_custom;'
|
||||
),
|
||||
3 => array(
|
||||
'ALTER TABLE rainloop_ab_properties CHANGE prop_value prop_value TEXT NOT NULL;',
|
||||
'ALTER TABLE rainloop_ab_properties CHANGE prop_value_custom prop_value_custom TEXT NOT NULL;',
|
||||
'ALTER TABLE rainloop_ab_properties CHANGE prop_value_lower prop_value_lower TEXT NOT NULL;'
|
||||
)
|
||||
));
|
||||
break;
|
||||
|
|
@ -1903,7 +1908,8 @@ SQLITEINITIAL;
|
|||
1 => $this->getInitialTablesArray($this->sDsnType),
|
||||
2 => array(
|
||||
'ALTER TABLE rainloop_ab_properties ADD prop_value_lower text NOT NULL DEFAULT \'\';'
|
||||
)
|
||||
),
|
||||
3 => array()
|
||||
));
|
||||
break;
|
||||
case 'sqlite':
|
||||
|
|
@ -1911,7 +1917,8 @@ SQLITEINITIAL;
|
|||
1 => $this->getInitialTablesArray($this->sDsnType),
|
||||
2 => array(
|
||||
'ALTER TABLE rainloop_ab_properties ADD prop_value_lower text NOT NULL DEFAULT \'\';'
|
||||
)
|
||||
),
|
||||
3 => array()
|
||||
));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue