missing parentheses
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 28 Jun 2015 06:03:13 +0000 (18:03 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 28 Jun 2015 06:03:13 +0000 (18:03 +1200)
CRM/Member/BAO/Membership.php
CRM/Member/BAO/MembershipLog.php
CRM/Member/Form/MembershipRenewal.php

index 82a44216e2bdfbe82437223bf7a24ed9c0ad7b5f..c0d3a71ea1986213a7a47fbf270f68f4b1ab2503 100644 (file)
@@ -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,
index 327bbb8b1e2fdfd487125d66694a819b08675a0e..1e0b0e2afec542efe7d2be67bf8471c3b7dc78dc 100644 (file)
@@ -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) {
index 9291ac6831dee09a967b3f2ec1f5bac01e909c8b..6a7a4d639474086589a68d47a44d41705e5ded0c 100644 (file)
@@ -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');