bulk comment fixes
[civicrm-core.git] / CRM / Core / BAO / ConfigSetting.php
index 7864add6b3ce532976c817788f18348bfc036d25..5faaeebd465b50c1ca8a1141e3ceb263e8fdeac7 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -29,7 +29,7 @@
  *
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -46,6 +46,8 @@ class CRM_Core_BAO_ConfigSetting {
    *
    * @params array $params associated array of civicrm variables
    *
+   * @param $params
+   *
    * @return null
    * @static
    */
@@ -62,6 +64,8 @@ class CRM_Core_BAO_ConfigSetting {
    *
    * @params array $params associated array of civicrm variables
    *
+   * @param $params
+   *
    * @return null
    * @static
    */
@@ -143,6 +147,8 @@ class CRM_Core_BAO_ConfigSetting {
    *
    * @params array $params associated array of civicrm variables
    *
+   * @param $params
+   *
    * @return null
    * @static
    */
@@ -236,16 +242,6 @@ class CRM_Core_BAO_ConfigSetting {
         }
       }
 
-      // since language field won't be present before upgrade.
-      if (CRM_Core_Config::isUpgradeMode()) {
-        // dont add if its empty
-        if (!empty($defaults)) {
-          // retrieve directory and url preferences also
-          CRM_Core_BAO_Setting::retrieveDirectoryAndURLPreferences($defaults);
-        }
-        return;
-      }
-
       // check if there are any locale strings
       if ($domain->locale_custom_strings) {
         $defaults['localeCustomStrings'] = unserialize($domain->locale_custom_strings);
@@ -314,7 +310,7 @@ class CRM_Core_BAO_ConfigSetting {
       global $dbLocale;
 
       // try to inherit the language from the hosting CMS
-      if (CRM_Utils_Array::value('inheritLocale', $defaults)) {
+      if (!empty($defaults['inheritLocale'])) {
         // FIXME: On multilanguage installs, CRM_Utils_System::getUFLocale() in many cases returns nothing if $dbLocale is not set
         $dbLocale = $multiLang ? "_{$defaults['lcMessages']}" : '';
         $lcMessages = CRM_Utils_System::getUFLocale();