From a36ecdd031cec1306e5986c50c12f7893d957219 Mon Sep 17 00:00:00 2001 From: Eileen Date: Thu, 2 Jan 2014 17:20:57 +1300 Subject: [PATCH] CRM-13187 fix typo & coding standards (replace tabs with 2 spaces ---------------------------------------- * CRM-13187: http://issues.civicrm.org/jira/browse/CRM-13187 --- CRM/Core/BAO/WordReplacement.php | 35 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) 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; + } + } + } } } } -- 2.25.1