Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes CRM-19915 #9739

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CRM/Core/BAO/ConfigSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ public static function applyLocale($settings, $activatedLocales) {
// try to inherit the language from the hosting CMS
if ($settings->get('inheritLocale')) {
// FIXME: On multilanguage installs, CRM_Utils_System::getUFLocale() in many cases returns nothing if $dbLocale is not set
$dbLocale = $multiLang ? ("_" . $settings->get('lcMessages')) : '';
$lcMessages = $settings->get('lcMessages');
$dbLocale = $multiLang && $lcMessages ? "_{$lcMessages}" : '';
$chosenLocale = CRM_Utils_System::getUFLocale();
if ($activatedLocales and !in_array($chosenLocale, explode(CRM_Core_DAO::VALUE_SEPARATOR, $activatedLocales))) {
$chosenLocale = NULL;
Expand All @@ -209,7 +210,7 @@ public static function applyLocale($settings, $activatedLocales) {
}

// set suffix for table names - use views if more than one language
$dbLocale = $multiLang ? "_{$chosenLocale}" : '';
$dbLocale = $multiLang && $chosenLocale ? "_{$chosenLocale}" : '';

// FIXME: an ugly hack to fix CRM-4041
global $tsLocale;
Expand Down