| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
$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);
}
* @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);
}
}
/**
* Global validation rules for the form
*
- * @param array $values posted values of the 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) {
*/
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++) {
CRM_Core_Session::setStatus("", ts("Settings Saved"), "success");
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/options/wordreplacements',
- "reset=1"
- ));
+ "reset=1"
+ ));
}
}
+
}