Merge branch 'master' into master

This commit is contained in:
RainLoop Team 2019-03-28 01:55:15 +03:00 committed by GitHub
commit 628f8077a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
393 changed files with 74330 additions and 64616 deletions

File diff suppressed because it is too large Load diff

View file

@ -183,7 +183,6 @@ class Application extends \RainLoop\Config\AbstractConfig
'contacts' => array(
'enable' => array(false, 'Enable contacts'),
'allow_sharing' => array(true),
'allow_sync' => array(false),
'sync_interval' => array(20),
'type' => array('sqlite', ''),
@ -257,6 +256,8 @@ class Application extends \RainLoop\Config\AbstractConfig
'forgot_password_link_url' => array('', ''),
'registration_link_url' => array('', ''),
'login_lowercase' => array(true, ''),
'sign_me_auto' => array(\RainLoop\Enumerations\SignMeType::DEFAILT_OFF,
'This option allows webmail to remember the logged in user
once they closed the browser window.
@ -385,7 +386,7 @@ Enables caching in the system'),
'allow_prefetch' => array(true),
'allow_smart_html_links' => array(true),
'cache_system_data' => array(true),
'date_from_headers' => array(false),
'date_from_headers' => array(true),
'autocreate_system_folders' => array(true),
'allow_message_append' => array(false),
'disable_iconv_if_mbstring_supported' => array(false),
@ -393,10 +394,11 @@ Enables caching in the system'),
'log_ajax_response_write_limit' => array(300),
'allow_html_editor_source_button' => array(false),
'allow_html_editor_biti_buttons' => array(false),
'allow_ctrl_enter_on_compose' => array(false),
'allow_ctrl_enter_on_compose' => array(true),
'try_to_detect_hidden_images' => array(false),
'hide_dangerous_actions' => array(false),
'use_app_debug_js' => array(false),
'use_mobile_version_for_tablets' => array(false),
'use_app_debug_css' => array(false),
'use_imap_sort' => array(true),
'use_imap_force_selection' => array(false),
@ -423,6 +425,7 @@ Enables caching in the system'),
'sieve_allow_raw_script' => array(false),
'sieve_utf8_folder_name' => array(true),
'sieve_auth_plain_initial' => array(true),
'sieve_allow_fileinto_inbox' => array(false),
'imap_timeout' => array(300),
'smtp_timeout' => array(60),
'sieve_timeout' => array(10),

View file

@ -1787,7 +1787,8 @@ CREATE TABLE IF NOT EXISTS rainloop_ab_properties (
PRIMARY KEY(id_prop),
INDEX id_user_rainloop_ab_properties_index (id_user),
INDEX id_user_id_contact_rainloop_ab_properties_index (id_user, id_contact)
INDEX id_user_id_contact_rainloop_ab_properties_index (id_user, id_contact),
INDEX id_contact_prop_type_rainloop_ab_properties_index (id_contact, prop_type)
)/*!40000 ENGINE=INNODB *//*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

View file

@ -150,8 +150,8 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
$sEmail = $mAccount;
}
$sEmail = \preg_replace('/[^a-z0-9\-\.@]+/', '_', $sEmail);
$sSubEmail = \preg_replace('/[^a-z0-9\-\.@]+/', '_', $sSubEmail);
$sEmail = \preg_replace('/[^a-z0-9\-\.@]+/i', '_', $sEmail);
$sSubEmail = \preg_replace('/[^a-z0-9\-\.@]+/i', '_', $sSubEmail);
$sTypePath = $sKeyPath = '';
switch ($iStorageType)

View file

@ -156,21 +156,26 @@ class Service
if ($this->oActions->Config()->Get('labs', 'allow_mobile_version', false))
{
$bUseMobileVersionForTablets = $this->oActions->Config()->Get('labs', 'use_mobile_version_for_tablets', false);
$oMobileDetect = new \Detection\MobileDetect();
$bMobileDevice = $oMobileDetect->isMobile() && !$oMobileDetect->isTablet();
$bMobileDevice = $oMobileDetect->isMobile() &&
($bUseMobileVersionForTablets ? true : !$oMobileDetect->isTablet());
$bMobile = (0 < \count($aPaths) && !empty($aPaths[0]) && 'mobile' === \strtolower($aPaths[0]));
}
if ($bIndex && !$bMobile)
{
$iMobileKey = (int) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 0);
if (1 !== $iMobileKey)
if ($bIndex)
{
if ($bMobileDevice)
{
$this->oActions->Location('./?/Mobile/');
return $this;
$sMobileType = (string) \RainLoop\Utils::GetCookie(\RainLoop\Actions::RL_MOBILE_TYPE, '');
switch ($sMobileType) {
default:
$sMobileType = '';
$bMobile = $bMobileDevice;
break;
case 'mobile':
$bMobile = true;
break;
case 'desktop':
$bMobile = false;
break;
}
}
}

View file

@ -829,9 +829,9 @@ class ServiceActions
/**
* @return string
*/
public function ServiceSkipMobile()
public function ServiceMobileVersion()
{
\RainLoop\Utils::SetCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY, 1);
\RainLoop\Utils::SetCookie(\RainLoop\Actions::RL_MOBILE_TYPE, 'mobile');
$this->oActions->Location('./');
return '';
}
@ -839,9 +839,9 @@ class ServiceActions
/**
* @return string
*/
public function ServiceClearSkipMobile()
public function ServiceDesktopVersion()
{
\RainLoop\Utils::ClearCookie(\RainLoop\Actions::RL_SKIP_MOBILE_KEY);
\RainLoop\Utils::SetCookie(\RainLoop\Actions::RL_MOBILE_TYPE, 'desktop');
$this->oActions->Location('./');
return '';
}
@ -1183,16 +1183,6 @@ class ServiceActions
}
}
/**
* @return string
*/
public function ServiceChangeMobile()
{
$this->changeAction();
$this->oActions->Location('./?/Mobile/');
return '';
}
/**
* @return string
*/

View file

@ -61,7 +61,10 @@ class Utils
if (!\class_exists('Crypt_RSA', false))
{
include_once 'Crypt/RSA.php';
\defined('CRYPT_RSA_MODE') || \define('CRYPT_RSA_MODE', CRYPT_RSA_MODE_INTERNAL);
if (!\defined('CRYPT_RSA_MODE') && \defined('CRYPT_RSA_MODE_INTERNAL'))
{
\define('CRYPT_RSA_MODE', CRYPT_RSA_MODE_INTERNAL);
}
}
if (\class_exists('Crypt_RSA'))