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

@ -9411,14 +9411,23 @@ class Actions
{
$oAccount = \call_user_func($fGetAccount);
$iDateTimeStampInUTC = $mResponse->InternalTimeStampInUTC();
if (0 === $iDateTimeStampInUTC || !!$this->Config()->Get('labs', 'date_from_headers', false))
{
$iDateTimeStampInUTC = $mResponse->HeaderTimeStampInUTC();
if (0 === $iDateTimeStampInUTC)
{
$iDateTimeStampInUTC = $mResponse->InternalTimeStampInUTC();
}
}
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), array(
'Folder' => $mResponse->Folder(),
'Uid' => (string) $mResponse->Uid(),
'Subject' => \trim(\MailSo\Base\Utils::Utf8Clear($mResponse->Subject())),
'MessageId' => $mResponse->MessageId(),
'Size' => $mResponse->Size(),
'DateTimeStampInUTC' => !!$this->Config()->Get('labs', 'date_from_headers', false)
? $mResponse->HeaderTimeStampInUTC() : $mResponse->InternalTimeStampInUTC(),
'DateTimeStampInUTC' => $iDateTimeStampInUTC,
'ReplyTo' => $this->responseObject($mResponse->ReplyTo(), $sParent, $aParameters),
'From' => $this->responseObject($mResponse->From(), $sParent, $aParameters),
'To' => $this->responseObject($mResponse->To(), $sParent, $aParameters),

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

View file

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