mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-27 23:44:48 +08:00
Small fixes
This commit is contained in:
parent
be26cd248c
commit
924e846135
8 changed files with 157 additions and 166 deletions
|
@ -12,9 +12,9 @@
|
|||
<dependencies>
|
||||
<php min-version="5.4" />
|
||||
<owncloud min-version="6" max-version="9.2" />
|
||||
<nextcloud min-version="10" />
|
||||
<nextcloud min-version="8" max-version="11" />
|
||||
</dependencies>
|
||||
<category>tools</category>
|
||||
<website>http://www.rainloop.net/</website>
|
||||
<website>https://www.rainloop.net/</website>
|
||||
<bugs>https://github.com/RainLoop/rainloop-webmail/issues</bugs>
|
||||
</info>
|
||||
|
|
|
@ -1,108 +1,113 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of MailSo.
|
||||
*
|
||||
* (c) 2014 Usenko Timur
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace MailSo;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
*/
|
||||
class Config
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $ICONV = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MBSTRING = true;
|
||||
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
public static $HtmlStrictAllowedTags = null;
|
||||
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
public static $HtmlStrictAllowedAttributes = null;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
public static $HtmlStrictDebug = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $FixIconvByMbstring = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListFastSimpleSearch = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListCountLimitTrigger = 0;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MessageListUndeletedOnly = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListDateFilter = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public static $MessageListPermanentFilter = '';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $LargeThreadLimit = 50;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MessageAllHeaders = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $LogSimpleLiterals = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $PreferStartTlsIfAutoDetect = true;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public static $BoundaryPrefix = '_Part_';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $ImapTimeout = 300;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger|null
|
||||
*/
|
||||
public static $SystemLogger = null;
|
||||
}
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of MailSo.
|
||||
*
|
||||
* (c) 2014 Usenko Timur
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace MailSo;
|
||||
|
||||
/**
|
||||
* @category MailSo
|
||||
*/
|
||||
class Config
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $ICONV = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MBSTRING = true;
|
||||
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
public static $HtmlStrictAllowedTags = null;
|
||||
|
||||
/**
|
||||
* @var array|null
|
||||
*/
|
||||
public static $HtmlStrictAllowedAttributes = null;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
public static $HtmlStrictDebug = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $FixIconvByMbstring = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListFastSimpleSearch = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListCountLimitTrigger = 0;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MessageListUndeletedOnly = true;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $MessageListDateFilter = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public static $MessageListPermanentFilter = '';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $LargeThreadLimit = 50;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $MessageAllHeaders = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $LogSimpleLiterals = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $CheckNewMessages = true;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public static $PreferStartTlsIfAutoDetect = true;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public static $BoundaryPrefix = '_Part_';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public static $ImapTimeout = 300;
|
||||
|
||||
/**
|
||||
* @var \MailSo\Log\Logger|null
|
||||
*/
|
||||
public static $SystemLogger = null;
|
||||
}
|
||||
|
|
|
@ -933,7 +933,7 @@ class MailClient
|
|||
'UidNext' => $sUidNext,
|
||||
'Flags' => $aFlags,
|
||||
'HighestModSeq' => $sHighestModSeq,
|
||||
'NewMessages' => 'INBOX' === $sFolderName ?
|
||||
'NewMessages' => 'INBOX' === $sFolderName && \MailSo\Config::$CheckNewMessages ?
|
||||
$this->getFolderNextMessageInformation($sFolderName, $sPrevUidNext, $sUidNext) : array()
|
||||
);
|
||||
|
||||
|
|
|
@ -1457,7 +1457,7 @@ class Actions
|
|||
'registrationLinkUrl' => \trim($oConfig->Get('login', 'registration_link_url', '')),
|
||||
'loginGlassStyle' => (bool) $oConfig->Get('login', 'glass_style', true),
|
||||
'hideSubmitButton' => (bool) $oConfig->Get('login', 'hide_submit_button', true),
|
||||
'activeBackgroud' => (bool) $oConfig->Get('login', 'active_backgroud', true),
|
||||
'activeBackgroud' => (bool) $oConfig->Get('login', 'active_backgroud', false),
|
||||
'jsHash' => \md5(\RainLoop\Utils::GetConnectionToken()),
|
||||
'useImapThread' => (bool) $oConfig->Get('labs', 'use_imap_thread', false),
|
||||
'useImapSubscribe' => (bool) $oConfig->Get('labs', 'use_imap_list_subscribe', true),
|
||||
|
|
|
@ -137,6 +137,8 @@ class Api
|
|||
|
||||
\MailSo\Config::$HtmlStrictDebug = !!\RainLoop\Api::Config()->Get('debug', 'enable', false);
|
||||
|
||||
\MailSo\Config::$CheckNewMessages = !!\RainLoop\Api::Config()->Get('labs', 'check_new_messages', true);
|
||||
|
||||
if (\RainLoop\Api::Config()->Get('labs', 'strict_html_parser', true))
|
||||
{
|
||||
\MailSo\Config::$HtmlStrictAllowedAttributes = array(
|
||||
|
|
|
@ -251,7 +251,7 @@ class Application extends \RainLoop\Config\AbstractConfig
|
|||
|
||||
'glass_style' => array(true),
|
||||
'hide_submit_button' => array(true),
|
||||
'active_backgroud' => array(true),
|
||||
'active_backgroud' => array(false),
|
||||
|
||||
'forgot_password_link_url' => array('', ''),
|
||||
'registration_link_url' => array('', ''),
|
||||
|
@ -446,9 +446,9 @@ Enables caching in the system'),
|
|||
'detect_image_exif_orientation' => array(true),
|
||||
'cookie_default_path' => array(''),
|
||||
'cookie_default_secure' => array(false),
|
||||
'check_new_messages' => array(true),
|
||||
'replace_env_in_configuration' => array(''),
|
||||
'startup_url' => array(''),
|
||||
'nice_social_redirect' => array(true),
|
||||
'strict_html_parser' => array(false),
|
||||
'allow_cmd' => array(false),
|
||||
'dev_email' => array(''),
|
||||
|
|
|
@ -128,7 +128,6 @@ class Social
|
|||
public function popupServiceResult($sTypeStr, $sLoginUrl, $bLogin, $iErrorCode)
|
||||
{
|
||||
$sResult = '';
|
||||
$bNiceSocialRedirect = $this->oActions->Config()->Get('labs', 'nice_social_redirect', true);
|
||||
$bAppCssDebug = !!$this->oActions->Config()->Get('labs', 'use_app_debug_css', false);
|
||||
|
||||
$sIcon = $sTypeStr;
|
||||
|
@ -139,22 +138,15 @@ class Social
|
|||
|
||||
if ($sLoginUrl)
|
||||
{
|
||||
if (!$bNiceSocialRedirect)
|
||||
{
|
||||
$this->oActions->Location($sLoginUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->oHttp->ServerNoCache();
|
||||
@\header('Content-Type: text/html; charset=utf-8');
|
||||
$this->oHttp->ServerNoCache();
|
||||
@\header('Content-Type: text/html; charset=utf-8');
|
||||
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Social.html'), array(
|
||||
'{{RefreshMeta}}' => '<meta http-equiv="refresh" content="0; URL='.$sLoginUrl.'" />',
|
||||
'{{Stylesheet}}' => $this->oActions->StaticPath('css/social'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||
'{{Icon}}' => $sIcon,
|
||||
'{{Script}}' => ''
|
||||
));
|
||||
}
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Social.html'), array(
|
||||
'{{RefreshMeta}}' => '<meta http-equiv="refresh" content="0; URL='.$sLoginUrl.'" />',
|
||||
'{{Stylesheet}}' => $this->oActions->StaticPath('css/social'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||
'{{Icon}}' => $sIcon,
|
||||
'{{Script}}' => ''
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -164,21 +156,13 @@ class Social
|
|||
$sCallBackType = $bLogin ? '_login' : '';
|
||||
$sConnectionFunc = 'rl_'.\md5(\RainLoop\Utils::GetConnectionToken()).'_'.$sTypeStr.$sCallBackType.'_service';
|
||||
|
||||
if (!$bNiceSocialRedirect)
|
||||
{
|
||||
$sResult = '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Social.html'), array(
|
||||
'{{RefreshMeta}}' => '',
|
||||
'{{Stylesheet}}' => $this->oActions->StaticPath('css/social'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||
'{{Icon}}' => $sIcon,
|
||||
'{{Script}}' => '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>'
|
||||
));
|
||||
}
|
||||
$sResult = \strtr(\file_get_contents(APP_VERSION_ROOT_PATH.'app/templates/Social.html'), array(
|
||||
'{{RefreshMeta}}' => '',
|
||||
'{{Stylesheet}}' => $this->oActions->StaticPath('css/social'.($bAppCssDebug ? '' : '.min').'.css'),
|
||||
'{{Icon}}' => $sIcon,
|
||||
'{{Script}}' => '<script data-cfasync="false">opener && opener.'.$sConnectionFunc.' && opener.'.
|
||||
$sConnectionFunc.'('.$iErrorCode.'); self && self.close && self.close();</script>'
|
||||
));
|
||||
}
|
||||
|
||||
return $sResult;
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="popups">
|
||||
<div class="modal hide b-welcom-page-content g-ui-user-select-none"
|
||||
data-bind="modal: modalVisibility" style="width: 600px">
|
||||
|
||||
<div class="modal-body" style="height: 450px; padding: 0">
|
||||
<div data-bind="if:welcomePageURL" style="height: 100%; width: 100%; margin: 0; padding: 0; position: relative">
|
||||
<iframe src="javascript:1;" tabindex="-1" frameborder="0"
|
||||
style="border: none; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px;"
|
||||
data-bind="attr: {'src': welcomePageURL}"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-bind="command: cancelCommand, hasFocus: closeFocused">
|
||||
<i class="icon-remove"></i>
|
||||
|
||||
<span class="i18n" data-i18n="POPUPS_WELCOME_PAGE/BUTTON_CLOSE"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="popups">
|
||||
<div class="modal hide b-welcom-page-content g-ui-user-select-none"
|
||||
data-bind="modal: modalVisibility" style="width: 600px">
|
||||
|
||||
<div class="modal-body" style="height: 450px; padding: 0">
|
||||
<div data-bind="if: welcomePageURL" style="height: 100%; width: 100%; margin: 0; padding: 0; position: relative">
|
||||
<iframe src="javascript:1;" tabindex="-1" frameborder="0"
|
||||
style="border: none; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px;"
|
||||
data-bind="attr: {'src': welcomePageURL}"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-bind="command: cancelCommand, hasFocus: closeFocused">
|
||||
<i class="icon-remove"></i>
|
||||
|
||||
<span class="i18n" data-i18n="POPUPS_WELCOME_PAGE/BUTTON_CLOSE"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Reference in a new issue