Member BAO class E-Notice identified in test
authorEileen <eileen@fuzion.co.nz>
Fri, 3 Jan 2014 06:43:18 +0000 (19:43 +1300)
committerEileen <eileen@fuzion.co.nz>
Fri, 3 Jan 2014 06:43:18 +0000 (19:43 +1300)
CRM/Member/BAO/Membership.php

index 5ba8d740fc1dea05300ad38f32a019a7cc9a7938..3b013a09a20a18bdfd797c55af831e79015bff0e 100644 (file)
@@ -1550,11 +1550,15 @@ AND civicrm_membership.is_test = %2";
 
     //decide status here, if needed.
     $updateStatusId = NULL;
-
+    $membershipID = NULL;
+    //@todo would be better to accept $membershipID as an FN param & make form layer responsible for extracting it
+    if(isset($form->_membershipId)) {
+      $membershipID = $form->_membershipId;
+    }
     // CRM-7297 - allow membership type to be be changed during renewal so long as the parent org of new membershipType
     // is the same as the parent org of an existing membership of the contact
     $currentMembership = CRM_Member_BAO_Membership::getContactMembership($contactID, $membershipTypeID,
-      $is_test, $form->_membershipId, TRUE
+      $is_test, $membershipID, TRUE
     );
     if ($currentMembership) {
       $activityType = 'Membership Renewal';