From cbe56ea639d1b7ad81f6b1d927cb1e7323c692c1 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 30 Aug 2013 15:07:25 -0700 Subject: [PATCH] CRM-13187 - Autoformat ---------------------------------------- * CRM-13187: hrui: Change breadcrumb from "CiviCRM" to "CiviHR" http://issues.civicrm.org/jira/browse/CRM-13187 --- CRM/Upgrade/Incremental/php/FourFour.php | 71 ++++++++++++------------ 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/CRM/Upgrade/Incremental/php/FourFour.php b/CRM/Upgrade/Incremental/php/FourFour.php index 40a6592d45..a920db401f 100644 --- a/CRM/Upgrade/Incremental/php/FourFour.php +++ b/CRM/Upgrade/Incremental/php/FourFour.php @@ -264,43 +264,42 @@ CREATE TABLE IF NOT EXISTS civicrm_word_replacement ( ); $queue->createItem($task, array('weight' => -1)); } - - /* - * Function will retrun Word Replacement for word_replacement create API - */ - + + /** + * Function will retrun Word Replacement for word_replacement create API + */ static function getWordReplacementCreateParams() { - $wordReplacementCreateParams = array(); - $params = array( - 'version' => 3 - ); - // get all domains - $result = civicrm_api('domain', 'get', $params); - if (!empty($result["values"])) { - foreach ($result["values"] as $value) { - $params = array(); - $params["version"] = 3; - $params["is_active"] = TRUE; - $params["domain_id"] = $value["id"]; - // unserialize word match string - $localeCustomArray = unserialize($value["locale_custom_strings"]); - if(!empty($localeCustomArray)) { - $wordMatchArray = array(); - foreach ($localeCustomArray as $localCustomData) { - $wordMatchArray = $localCustomData["enabled"]["wildcardMatch"]; - } - - if(!empty($wordMatchArray)) { - foreach ($wordMatchArray as $word=>$replace) { - $params["find_word"] = $word; - $params["replace_word"] = $replace; - $wordReplacementCreateParams[] = $params; - } - } - } - } - } - return $wordReplacementCreateParams; + $wordReplacementCreateParams = array(); + $params = array( + 'version' => 3 + ); + // get all domains + $result = civicrm_api('domain', 'get', $params); + if (!empty($result["values"])) { + foreach ($result["values"] as $value) { + $params = array(); + $params["version"] = 3; + $params["is_active"] = TRUE; + $params["domain_id"] = $value["id"]; + // unserialize word match string + $localeCustomArray = unserialize($value["locale_custom_strings"]); + if (!empty($localeCustomArray)) { + $wordMatchArray = array(); + foreach ($localeCustomArray as $localCustomData) { + $wordMatchArray = $localCustomData["enabled"]["wildcardMatch"]; + } + + if (!empty($wordMatchArray)) { + foreach ($wordMatchArray as $word => $replace) { + $params["find_word"] = $word; + $params["replace_word"] = $replace; + $wordReplacementCreateParams[] = $params; + } + } + } + } + } + return $wordReplacementCreateParams; } public static function saveWordReplacements($wordReplacementCreateParams) { -- 2.25.1