X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FWordReplacements.php;h=009060b42ee8446dcd93f400fbd44ca1f892c2bc;hb=d25dd0ee5e47188c3ea9ad2918f627cfac97ddbd;hp=a6054baf948a4afe9679d5cfb48f02595e1bd29f;hpb=5173bd95fdbe5bed239a4b1a93e1536f8a9eb2a5;p=civicrm-core.git diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index a6054baf94..009060b42e 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * @@ -51,9 +51,12 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { $breadCrumbUrl = CRM_Utils_System::url('civicrm/admin/options/wordreplacements', "reset=1" ); - $breadCrumb = array(array('title' => ts('Word Replacements'), + $breadCrumb = array( + array( + 'title' => ts('Word Replacements'), 'url' => $breadCrumbUrl, - )); + ), + ); CRM_Utils_System::appendBreadCrumb($breadCrumb); } @@ -116,13 +119,13 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { * @return void */ public function buildQuickForm() { - $config = CRM_Core_Config::singleton(); - $values = $config->localeCustomStrings[$config->lcMessages]; + $config = CRM_Core_Config::singleton(); + $values = $config->localeCustomStrings[$config->lcMessages]; //CRM-14179 $instances = 0; - foreach ( $values as $valMatchType ) { - foreach ( $valMatchType as $valPairs ) { + foreach ($values as $valMatchType) { + foreach ($valMatchType as $valPairs) { $instances += count($valPairs); } } @@ -179,15 +182,15 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { * @param array $values * Posted values of the form. * - * @return array list of errors to be posted back to the form - * @static + * @return array + * list of errors to be posted back to the form */ public static function formRule($values) { $errors = array(); - $oldValues = CRM_Utils_Array::value('old', $values); - $newValues = CRM_Utils_Array::value('new', $values); - $enabled = CRM_Utils_Array::value('enabled', $values); + $oldValues = CRM_Utils_Array::value('old', $values); + $newValues = CRM_Utils_Array::value('new', $values); + $enabled = CRM_Utils_Array::value('enabled', $values); $exactMatch = CRM_Utils_Array::value('cb', $values); foreach ($oldValues as $k => $v) { @@ -216,7 +219,7 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { */ public function postProcess() { $params = $this->controller->exportValues($this->_name); - $this->_numStrings = sizeof($params['old']); + $this->_numStrings = count($params['old']); $enabled['exactMatch'] = $enabled['wildcardMatch'] = $disabled['exactMatch'] = $disabled['wildcardMatch'] = array(); for ($i = 1; $i <= $this->_numStrings; $i++) { @@ -274,8 +277,9 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { CRM_Core_Session::setStatus("", ts("Settings Saved"), "success"); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/options/wordreplacements', - "reset=1" - )); + "reset=1" + )); } } + }