Fix conflict on visibility of ->_paymentProcessors
[civicrm-core.git] / CRM / Contribute / Form / Contribution / ThankYou.php
index aff8eb276b5974424b115541d22c0aaf3b637cdb..f9dc5d3fb479f2936c2e8f350281fe0ac78e168d 100644 (file)
@@ -45,8 +45,6 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
 
   /**
    * Set variables up before form is built.
-   *
-   * @return void
    */
   public function preProcess() {
     parent::preProcess();
@@ -174,14 +172,17 @@ class CRM_Contribute_Form_Contribution_ThankYou extends CRM_Contribute_Form_Cont
       $this->assign('membership_amount', $membershipAmount);
       $this->assign('renewal_mode', $renewalMode);
 
-      CRM_Member_BAO_Membership::buildMembershipBlock($this,
-        $this->_id,
+      $this->buildMembershipBlock(
         $this->_membershipContactID,
         FALSE,
         $membershipTypeID,
         TRUE,
         NULL
       );
+
+      if (!empty($params['auto_renew'])) {
+        $this->assign('auto_renew', TRUE);
+      }
     }
 
     $this->_separateMembershipPayment = $this->get('separateMembershipPayment');