Small fixes

This commit is contained in:
RainLoop Team 2014-02-18 01:25:19 +04:00
parent 76c21b82b3
commit fd58f4dcd5
18 changed files with 491 additions and 429 deletions

View file

@ -5199,14 +5199,18 @@ class Actions
}
$aHeaders = $mRow;
foreach ($aHeaders as $iIndex => $sHeaderValue)
{
$aHeaders[$iIndex] = \MailSo\Base\Utils::Utf8Clear($sHeaderValue);
}
}
else
{
$aNewItem = array();
foreach ($aHeaders as $iIndex => $sHeaderValue)
{
$aNewItem[@\iconv('utf-8', 'utf-8//IGNORE', $sHeaderValue)] =
isset($mRow[$iIndex]) ? $mRow[$iIndex] : '';
$aNewItem[$sHeaderValue] = isset($mRow[$iIndex]) ? $mRow[$iIndex] : '';
}
$aData[] = $aNewItem;

View file

@ -214,6 +214,7 @@ Enables caching in the system'),
'autocreate_system_folders' => array(true),
'allow_message_append' => array(false),
'determine_user_language' => array(true),
'disable_iconv_if_mbstring_supported' => array(false),
'login_fault_delay' => array(1),
'log_ajax_response_write_limit' => array(300),
'allow_html_editor_source_button' => array(false),

View file

@ -10,7 +10,7 @@ if (!function_exists('mb_strtoupper'))
else $encoding = strtoupper($encoding);
if ('UTF-8' === $encoding || 'UTF8' === $encoding) $encoding = INF;
else $s = iconv($encoding, 'UTF-8//IGNORE', $s);
else $s = function_exists('iconv') ? iconv($encoding, 'UTF-8//IGNORE', $s) : $s;
static $upper;
isset($upper) || $upper = unserialize(base64_decode('YToxMDUxOntzOjE6ImEiO3M6MToiQSI7czoxOiJiIjtzOjE6IkIiO3M6MToiYyI7czoxOiJDIjtz
@ -400,7 +400,7 @@ czo0OiLwkJCmIjtzOjQ6IvCQkY8iO3M6NDoi8JCQpyI7fQ=='));
}
if (INF === $encoding) return $s;
else return iconv('UTF-8', $encoding, $s);
else return function_exists('iconv') ? iconv('UTF-8', $encoding, $s) : $s;
}
}

View file

@ -37,6 +37,12 @@ class Service
\ini_set('display_errors', 1);
}
if ($this->oActions->Config()->Get('labs', 'disable_iconv_if_mbstring_supported') &&
\class_exists('MailSo\Capa') && \MailSo\Base\Utils::IsMbStringSupported())
{
\MailSo\Capa::$ICONV = false;
}
$sServer = \trim($this->oActions->Config()->Get('security', 'custom_server_signature', ''));
if (0 < \strlen($sServer))
{
@ -91,7 +97,7 @@ class Service
{
return $this;
}
$this->oActions->ParseQueryAuthString();
if (defined('APP_INSTALLED_START') && defined('APP_INSTALLED_VERSION') &&