From 2ba175b6209865f04fceec23a7f1e6a6c13348ac Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 2 Aug 2013 14:31:56 -0700 Subject: [PATCH] CRM-13064 ---------------------------------------- * CRM-13064: Localization is broken http://issues.civicrm.org/jira/browse/CRM-13064 --- CRM/Core/Config.php | 10 ++++++++-- CRM/Core/Config/Defaults.php | 1 + CRM/Core/I18n.php | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 6ee9c2f7b1..f6442fb9e0 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -193,10 +193,16 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { //initialize variables. for gencode we cannot load from the //db since the db might not be initialized if ($loadFromDB) { + // initialize stuff from the settings file + self::$_singleton->setCoreVariables(); + self::$_singleton->_initVariables(); - // retrieve and overwrite stuff from the settings file - self::$_singleton->setCoreVariables(); + // I dont think we need to do this twice + // however just keeping this commented for now in 4.4 + // in case we hit any issues - CRM-13064 + // We can safely delete this once we release 4.4.4 + // self::$_singleton->setCoreVariables(); } $cache->set('CRM_Core_Config' . CRM_Core_Config::domainID(), self::$_singleton); } diff --git a/CRM/Core/Config/Defaults.php b/CRM/Core/Config/Defaults.php index 52d49deab8..07156caae8 100644 --- a/CRM/Core/Config/Defaults.php +++ b/CRM/Core/Config/Defaults.php @@ -41,6 +41,7 @@ * */ class CRM_Core_Config_Defaults { + function setCoreVariables() { global $civicrm_root; diff --git a/CRM/Core/I18n.php b/CRM/Core/I18n.php index 56f3b39ede..991dcd58ff 100644 --- a/CRM/Core/I18n.php +++ b/CRM/Core/I18n.php @@ -35,7 +35,8 @@ class CRM_Core_I18n { /** - * A PHP-gettext instance for string translation; should stay null if the strings are not to be translated (en_US). + * A PHP-gettext instance for string translation; + * should stay null if the strings are not to be translated (en_US). */ private $_phpgettext = NULL; -- 2.25.1