From fe2c5efd20d5213427309bebbf454b1067fbcc18 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Wed, 6 Nov 2013 19:16:25 +0530 Subject: [PATCH] Camel casing fix for --- CRM/Contribute/Form/Contribution/OnBehalfOf.php | 8 ++++---- CRM/Contribute/Form/ContributionBase.php | 10 +++++----- CRM/Profile/Form.php | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CRM/Contribute/Form/Contribution/OnBehalfOf.php b/CRM/Contribute/Form/Contribution/OnBehalfOf.php index 2c62bcaa23..6807fd3cdc 100644 --- a/CRM/Contribute/Form/Contribution/OnBehalfOf.php +++ b/CRM/Contribute/Form/Contribution/OnBehalfOf.php @@ -152,7 +152,7 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf { } $stateCountryMap = array(); - $location_type_id = null; + $locationTypeId = null; foreach ($profileFields as $name => $field) { if (in_array($field['field_type'], $fieldTypes)) { list($prefixName, $index) = CRM_Utils_System::explode('-', $name, 2); @@ -165,10 +165,10 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf { $stateCountryMap[$index][$prefixName] = 'onbehalf[' . $name . ']'; if (count($form->_submitValues)) { - $location_type_id = $field['location_type_id']; - if(!empty($form->_submitValues['onbehalf']["country-{$location_type_id}"]) && + $locationTypeId = $field['location_type_id']; + if (!empty($form->_submitValues['onbehalf']["country-{$locationTypeId}"]) && $prefixName == "state_province") { - $field['is_required'] = CRM_Core_Payment_Form::checkRequiredStateProvince($form, "country-{$location_type_id}", TRUE); + $field['is_required'] = CRM_Core_Payment_Form::checkRequiredStateProvince($form, "country-{$locationTypeId}", TRUE); } } } diff --git a/CRM/Contribute/Form/ContributionBase.php b/CRM/Contribute/Form/ContributionBase.php index 23a3b24b8e..8a6f17b63c 100644 --- a/CRM/Contribute/Form/ContributionBase.php +++ b/CRM/Contribute/Form/ContributionBase.php @@ -714,12 +714,12 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form { } else { if (count($this->_submitValues)) { - $location_type_id = $field['location_type_id']; - if (array_key_exists("country-{$location_type_id}", $fields) && - array_key_exists("state_province-{$location_type_id}", $fields) && - !empty($this->_submitValues["country-{$location_type_id}"])) { + $locationTypeId = $field['location_type_id']; + if (array_key_exists("country-{$locationTypeId}", $fields) && + array_key_exists("state_province-{$locationTypeId}", $fields) && + !empty($this->_submitValues["country-{$locationTypeId}"])) { $field['is_required'] = - CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$location_type_id}"); + CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$locationTypeId}"); } } } diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index c55b089dd8..066c4396bf 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -681,16 +681,16 @@ class CRM_Profile_Form extends CRM_Core_Form { } if (count($this->_submitValues)) { - $location_type_id = null; + $locationTypeId = null; foreach ($this->_fields as $field) { if (!empty($field['location_type_id'])) { - $location_type_id = $field['location_type_id']; + $locationTypeId = $field['location_type_id']; } - if (array_key_exists("country-{$location_type_id}", $this->_fields) && - array_key_exists("state_province-{$location_type_id}", $this->_fields) && - !empty($this->_submitValues["country-{$location_type_id}"])) { - $this->_fields["state_province-{$location_type_id}"]['is_required'] = - CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$location_type_id}"); + if (array_key_exists("country-{$locationTypeId}", $this->_fields) && + array_key_exists("state_province-{$locationTypeId}", $this->_fields) && + !empty($this->_submitValues["country-{$locationTypeId}"])) { + $this->_fields["state_province-{$locationTypeId}"]['is_required'] = + CRM_Core_Payment_Form::checkRequiredStateProvince($this, "country-{$locationTypeId}"); } } } -- 2.25.1