X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FWordReplacement.php;h=3becc858d1de8c99e8e7bf9a3250028606d5c9a8;hb=b824d5c0a288d8c466a85715cdb8eac5e8b669ec;hp=615e933be26bcde27f9cc087c939416e92ae548b;hpb=7791c05ff3b621589d135f3a01189d7f0a563db9;p=civicrm-core.git diff --git a/CRM/Core/BAO/WordReplacement.php b/CRM/Core/BAO/WordReplacement.php index 615e933be2..3becc858d1 100644 --- a/CRM/Core/BAO/WordReplacement.php +++ b/CRM/Core/BAO/WordReplacement.php @@ -67,7 +67,7 @@ class CRM_Core_BAO_WordReplacement extends CRM_Core_DAO_WordReplacement { static function getWordReplacement($reset = NULL) { static $wordReplacement = NULL; if (!$wordReplacement || $reset) { - $wordReplacement = new CRM_Core_BAO_WordRepalcement(); + $wordReplacement = new CRM_Core_BAO_WordReplacement(); $wordReplacement->id = CRM_Core_Config::wordReplacementID(); if (!$wordReplacement->find(TRUE)) { CRM_Core_Error::fatal(); @@ -152,9 +152,10 @@ WHERE domain_id = %1 while ($dao->fetch()) { if ($dao->is_active==1) { - $overrides['enabled'][$dao->match_type][$dao->find_word] = $dao->replace_word; - } else { - $overrides['disabled'][$dao->match_type][$dao->find_word] = $dao->replace_word; + $overrides['enabled'][$dao->match_type][$dao->find_word] = $dao->replace_word; + } + else { + $overrides['disabled'][$dao->match_type][$dao->find_word] = $dao->replace_word; } } $config = CRM_Core_Config::singleton(); @@ -228,19 +229,19 @@ WHERE domain_id = %1 $wordMatchArray = array(); // Traverse Language array foreach ($localeCustomArray as $localCustomData) { - // Traverse status array "enabled" "disabled" - foreach ($localCustomData as $status => $matchTypes) { - $params["is_active"] = ($status == "enabled")?TRUE:FALSE; - // Traverse Match Type array "wildcardMatch" "exactMatch" - foreach ($matchTypes as $matchType => $words) { - $params["match_type"] = $matchType; - foreach ($words as $word => $replace) { - $params["find_word"] = $word; - $params["replace_word"] = $replace; - $wordReplacementCreateParams[] = $params; - } - } - } + // Traverse status array "enabled" "disabled" + foreach ($localCustomData as $status => $matchTypes) { + $params["is_active"] = ($status == "enabled")?TRUE:FALSE; + // Traverse Match Type array "wildcardMatch" "exactMatch" + foreach ($matchTypes as $matchType => $words) { + $params["match_type"] = $matchType; + foreach ($words as $word => $replace) { + $params["find_word"] = $word; + $params["replace_word"] = $replace; + $wordReplacementCreateParams[] = $params; + } + } + } } } }