From a8d4ff25dd3009a51de487cf95b29b57aa559f1d Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 12 Apr 2013 09:39:24 -0700 Subject: [PATCH] CRM-12332 and fix spelling ---------------------------------------- * CRM-12332: Strict warning when adding a new member http://issues.civicrm.org/jira/browse/CRM-12332 --- CRM/Member/BAO/Membership.php | 2 +- CRM/Member/Form/Membership.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index d01354651e..bc3d44682e 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1166,7 +1166,7 @@ AND civicrm_membership.is_test = %2"; * * @return */ - function statusAvilability($contactId) { + static function statusAvailabilty($contactId) { $membership = new CRM_Member_DAO_MembershipStatus(); $membership->whereAdd('is_active=1'); $count = $membership->count(); diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index b6e7e2b8e6..52cf0089a7 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -188,7 +188,7 @@ class CRM_Member_Form_Membership extends CRM_Member_Form { if ($this->_action & CRM_Core_Action::ADD) { //check whether any active membership statuses are available - redirects back to contact summary if not - CRM_Member_BAO_Membership::statusAvilability($this->_contactID); + CRM_Member_BAO_Membership::statusAvailabilty($this->_contactID); if ($this->_contactID) { //check whether contact has a current membership so we can alert user that they may want to do a renewal instead @@ -888,7 +888,7 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; if ($priceSetId && !$self->_mode && !CRM_Utils_Array::value('record_contribution', $params)) { $errors['record_contribution'] = ts('Record Membership Payment is required when you using price set.'); } - + if (!$priceSetId && $self->_mode && !CRM_Utils_Array::value('financial_type_id', $params)) { $errors['financial_type_id'] = ts('Please enter the financial Type.'); } @@ -1273,7 +1273,7 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; else { $params['total_amount'] = CRM_Utils_Array::value('total_amount', $formValues, 0); } - + if ($priceSetId && !$isQuickConfig) { $params['financial_type_id'] = CRM_Core_DAO::getFieldValue( 'CRM_Price_DAO_Set', $priceSetId, -- 2.25.1