From: sunil Date: Wed, 13 Apr 2016 14:26:07 +0000 (+0530) Subject: reverted setlocale related changes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=53d468495406a7f48438dea66a737a2508ec2706;p=civicrm-core.git reverted setlocale related changes --- diff --git a/CRM/Core/BAO/ConfigSetting.php b/CRM/Core/BAO/ConfigSetting.php index 39506c65b7..e2a708c3dc 100644 --- a/CRM/Core/BAO/ConfigSetting.php +++ b/CRM/Core/BAO/ConfigSetting.php @@ -212,7 +212,8 @@ class CRM_Core_BAO_ConfigSetting { $dbLocale = $multiLang ? "_{$chosenLocale}" : ''; // FIXME: an ugly hack to fix CRM-4041 - CRM_Core_I18n::setLocale($chosenLocale); + global $tsLocale; + $tsLocale = $chosenLocale; // FIXME: as bad aplace as any to fix CRM-5428 // (to be moved to a sane location along with the above) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 18601e287c..8cde4f692f 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -602,9 +602,8 @@ class CRM_Core_I18n { } // for sql queries - global $dbLocale, $tsLocale; + global $dbLocale; $dbLocale = "_{$language}"; - $tsLocale = $language; } diff --git a/Civi/API/Subscriber/I18nSubscriber.php b/Civi/API/Subscriber/I18nSubscriber.php index b87f8fbed7..11b72e9cec 100644 --- a/Civi/API/Subscriber/I18nSubscriber.php +++ b/Civi/API/Subscriber/I18nSubscriber.php @@ -102,7 +102,8 @@ class I18nSubscriber implements EventSubscriberInterface { $dbLocale = $multiLang && $lcMessages ? "_{$lcMessages}" : ''; // FIXME: an ugly hack to fix CRM-4041 - \CRM_Core_I18n::setLocale($lcMessages); + global $tsLocale; + $tsLocale = $lcMessages; } } }