Fix conflict on visibility of ->_paymentProcessors
[civicrm-core.git] / CRM / Contribute / Form / Contribution / ThankYou.php
index 89045a7de879858ca707eb5b30b5c8507f559a43..f9dc5d3fb479f2936c2e8f350281fe0ac78e168d 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -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');