From fde5f0d00fd3b3102f778d8f4214abe35898a6db Mon Sep 17 00:00:00 2001 From: sunil Date: Wed, 13 Apr 2016 19:03:54 +0530 Subject: [PATCH] CRM-18362 Fixed issue with redeclare setLocale function --- CRM/Core/I18n.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 5396e9e19c..e473104917 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -565,7 +565,7 @@ class CRM_Core_I18n { * Language (for example 'en_US', or 'fr_CA'). * True if the domain was changed for an extension. */ - public function setLocale($language) { + public static function setLocale($language) { $config = CRM_Core_Config::singleton(); @@ -602,8 +602,9 @@ class CRM_Core_I18n { } // for sql queries - global $dbLocale; + global $dbLocale, $tsLocale; $dbLocale = "_{$language}"; + $tsLocale = $language; } @@ -679,15 +680,6 @@ class CRM_Core_I18n { return $tsLocale; } - /** - * Set the current locale - * @param $locale - */ - public static function setLocale($locale) { - global $tsLocale; - $tsLocale = $locale; - } - } /** -- 2.25.1