From dfc9c0c767ceec9177aa234f4cab3c9836a9ee0b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 28 Jun 2015 18:03:13 +1200 Subject: [PATCH] missing parentheses --- CRM/Member/BAO/Membership.php | 2 +- CRM/Member/BAO/MembershipLog.php | 12 +++++------- CRM/Member/Form/MembershipRenewal.php | 11 ++++------- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index 82a44216e2..c0d3a71ea1 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1441,7 +1441,7 @@ AND civicrm_membership.is_test = %2"; } } - list($membership, $renewalMode, $dates) = self::renewMembership( + list($membership, $renewalMode, $dates) = self::renewMembership( $contactID, $memType, $isTest, date('YmdHis'), CRM_Utils_Array::value('cms_contactID', $membershipParams), $customFieldsFormatted, $numTerms, $membershipID, $pending, diff --git a/CRM/Member/BAO/MembershipLog.php b/CRM/Member/BAO/MembershipLog.php index 327bbb8b1e..1e0b0e2afe 100644 --- a/CRM/Member/BAO/MembershipLog.php +++ b/CRM/Member/BAO/MembershipLog.php @@ -38,17 +38,13 @@ class CRM_Member_BAO_MembershipLog extends CRM_Member_DAO_MembershipLog { * Add the membership log record. * * @param array $params - * Reference array contains the values submitted by the form. - * @param array $ids - * Reference array contains the id. + * Properties of the log item. * - * - * @return object + * @return CRM_Member_DAO_MembershipLog|CRM_Core_Error */ - public static function add(&$params) { + public static function add($params) { $membershipLog = new CRM_Member_DAO_MembershipLog(); $membershipLog->copyValues($params); - $membershipLog->save(); $membershipLog->free(); @@ -69,6 +65,8 @@ class CRM_Member_BAO_MembershipLog extends CRM_Member_DAO_MembershipLog { } /** + * Reset the modified ID to NULL for log items by the given contact ID. + * * @param int $contactID */ public static function resetModifiedID($contactID) { diff --git a/CRM/Member/Form/MembershipRenewal.php b/CRM/Member/Form/MembershipRenewal.php index 9291ac6831..6a7a4d6394 100644 --- a/CRM/Member/Form/MembershipRenewal.php +++ b/CRM/Member/Form/MembershipRenewal.php @@ -611,7 +611,7 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { $this->_params['is_pay_later'] = 1; } - $contributionRecurID = isset($form->_params['contributionRecurID']) ? $form->_params['contributionRecurID'] : NULL; + $contributionRecurID = isset($this->_params['contributionRecurID']) ? $this->_params['contributionRecurID'] : NULL; $membershipSource = NULL; if (!empty($form->_params['membership_source'])) { @@ -633,17 +633,14 @@ class CRM_Member_Form_MembershipRenewal extends CRM_Member_Form { } $renewMembership = CRM_Member_BAO_Membership::renewMembership( $this->_contactID, $formValues['membership_type_id'][1], $isTestMembership, - $renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId, self::extractPendingFormValue($this, $formValues['membership_type_id'][1], + $renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId, + self::extractPendingFormValue($this, $formValues['membership_type_id'][1]), $contributionRecurID, $membershipSource, $isPayLater, $campaignId ); $endDate = CRM_Utils_Date::processDate($renewMembership->end_date); - // Retrieve the name and email of the current user - this will be the FROM for the receipt email - $session = CRM_Core_Session::singleton(); - $userID = $session->get('userID'); - - list($userName, $userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($userID); + list($userName) = CRM_Contact_BAO_Contact_Location::getEmailDetails(CRM_Core_Session::singleton()->get('userID')); $memType = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $renewMembership->membership_type_id, 'name'); -- 2.25.1