Merge remote-tracking branch 'upstream/4.6' into 4.6-master-2015-09-21-15-52-41
[civicrm-core.git] / CRM / Contribute / BAO / ContributionPage.php
index 1b4df7e00c9473508524aaa371000595f346b074..5d86d79a4a6d44d3d3f61031f47a77e03ad81c2a 100644 (file)
@@ -798,6 +798,7 @@ LEFT JOIN  civicrm_premiums            ON ( civicrm_premiums.entity_id = civicrm
    * @return array|string
    */
   public static function formatModuleData($params, $setDefault = FALSE, $module) {
+    global $tsLocale;
     $config = CRM_Core_Config::singleton();
     $json = $jsonDecode = NULL;
     $domain = new CRM_Core_DAO_Domain();
@@ -829,12 +830,12 @@ LEFT JOIN  civicrm_premiums            ON ( civicrm_premiums.entity_id = civicrm
         $jsonDecode += (array) $jsonDecode['default'];
         unset($jsonDecode['default']);
       }
-      elseif (!empty($jsonDecode[$config->lcMessages])) {
+      elseif (!empty($jsonDecode[$tsLocale])) {
         //multilingual state
-        foreach ($jsonDecode[$config->lcMessages] as $column => $value) {
+        foreach ($jsonDecode[$tsLocale] as $column => $value) {
           $jsonDecode[$column] = $value;
         }
-        unset($jsonDecode[$config->lcMessages]);
+        unset($jsonDecode[$tsLocale]);
       }
       return $jsonDecode;
     }