diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php index f175c0b83..aced6b6bf 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -8923,6 +8923,14 @@ class Actions $sDefault = $sDefault.'_'.$sDefault; } + $sLanguage = \preg_replace_callback('/_([a-zA-Z0-9]{2})$/', function ($aData) { + return \strtoupper($aData[0]); + }, $sLanguage); + + $sDefault = \preg_replace_callback('/_([a-zA-Z0-9]{2})$/', function ($aData) { + return \strtoupper($aData[0]); + }, $sDefault); + if (\in_array($sLanguage, $aLang)) { $sResult = $sLanguage; @@ -8935,8 +8943,8 @@ class Actions if (empty($sResult) && !$bAllowEmptyResult) { - $sResult = $this->Config()->Get('webmail', $bAdmin ? 'language_admin' : 'language', 'en_us'); - $sResult = \in_array($sResult, $aLang) ? $sResult : 'en_us'; + $sResult = $this->Config()->Get('webmail', $bAdmin ? 'language_admin' : 'language', 'en_US'); + $sResult = \in_array($sResult, $aLang) ? $sResult : 'en_US'; } } @@ -9063,7 +9071,7 @@ class Actions { if ('.' !== $sFile{0} && \is_file($sDir.'/'.$sFile) && '.yml' === \substr($sFile, -4)) { - $sLang = \strtolower(\substr($sFile, 0, -4)); + $sLang = \substr($sFile, 0, -4); if (0 < \strlen($sLang) && 'always' !== $sLang && '_source.en' !== $sLang) { \array_push($aList, $sLang); @@ -9482,11 +9490,13 @@ class Actions if (null === $aLang) { + $sLang = $this->ValidateLanguage($sLang, 'en'); + $aLang = array(); // \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/i18n/langs.ini', $aLang); // \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'langs/'.$sLang.'.ini', $aLang); \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/langs.yml', $aLang); - \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/webmail/'.$sLang.'.ini', $aLang); + \RainLoop\Utils::ReadAndAddLang(APP_VERSION_ROOT_PATH.'app/localization/webmail/'.$sLang.'.yml', $aLang); $this->Plugins()->ReadLang($sLang, $aLang); } diff --git a/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php b/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php index 68a527e7e..ebcc0941e 100644 --- a/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php +++ b/rainloop/v/0.0.0/app/libraries/RainLoop/ServiceActions.php @@ -226,6 +226,8 @@ class ServiceActions */ public function ServiceOwnCloudAuth() { + $this->oHttp->ServerNoCache(); + if (!\RainLoop\Utils::IsOwnCloud() || !isset($_ENV['___rainloop_owncloud_email']) || !isset($_ENV['___rainloop_owncloud_password']) || @@ -840,6 +842,8 @@ class ServiceActions */ public function ServiceMailto() { + $this->oHttp->ServerNoCache(); + $sTo = \trim($this->oHttp->GetQuery('to', '')); if (!empty($sTo) && \preg_match('/^mailto:/i', $sTo)) { @@ -859,6 +863,8 @@ class ServiceActions */ public function ServicePing() { + $this->oHttp->ServerNoCache(); + @\header('Content-Type: text/plain; charset=utf-8'); $this->oActions->Logger()->Write('Pong', \MailSo\Log\Enumerations\Type::INFO, 'PING'); return 'Pong'; @@ -869,6 +875,8 @@ class ServiceActions */ public function ServiceInfo() { + $this->oHttp->ServerNoCache(); + if ($this->oActions->IsAdminLoggined(false)) { @\header('Content-Type: text/html; charset=utf-8'); @@ -881,6 +889,8 @@ class ServiceActions */ public function ServiceSso() { + $this->oHttp->ServerNoCache(); + $oException = null; $oAccount = null; $bLogout = true; @@ -997,6 +1007,8 @@ class ServiceActions */ public function ServiceExternalLogin() { + $this->oHttp->ServerNoCache(); + $oException = null; $oAccount = null; $bLogout = true; @@ -1063,6 +1075,8 @@ class ServiceActions */ public function ServiceExternalSso() { + $this->oHttp->ServerNoCache(); + $sResult = ''; $bLogout = true; $sKey = $this->oActions->Config()->Get('labs', 'external_sso_key', ''); @@ -1104,6 +1118,8 @@ class ServiceActions */ public function ServiceChange() { + $this->oHttp->ServerNoCache(); + $oAccount = $this->oActions->GetAccount(); if ($oAccount && $this->oActions->GetCapa(false, \RainLoop\Enumerations\Capa::ADDITIONAL_ACCOUNTS, $oAccount)) diff --git a/rainloop/v/0.0.0/app/localization/langs.yml b/rainloop/v/0.0.0/app/localization/langs.yml index 6b71ebd02..3f95eb9b7 100644 --- a/rainloop/v/0.0.0/app/localization/langs.yml +++ b/rainloop/v/0.0.0/app/localization/langs.yml @@ -2,7 +2,7 @@ Common: LANGS_NAMES: LANG_EN: English - LANG_EN_US: English (US) + LANG_EN_US: English LANG_EN_GB: English (UK) LANG_EN_UK: English (UK) LANG_EN_CA: English (Canadian) diff --git a/rainloop/v/0.0.0/app/templates/Views/Admin/AdminSettingsGeneral.html b/rainloop/v/0.0.0/app/templates/Views/Admin/AdminSettingsGeneral.html index ddd69856f..f1effa3f3 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Admin/AdminSettingsGeneral.html +++ b/rainloop/v/0.0.0/app/templates/Views/Admin/AdminSettingsGeneral.html @@ -13,7 +13,7 @@
- +    diff --git a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html index 898d563b0..4e365ef2d 100644 --- a/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html +++ b/rainloop/v/0.0.0/app/templates/Views/Common/PopupsLanguages.html @@ -11,7 +11,7 @@