manual merge of fixes for CRM-13981
[civicrm-core.git] / CRM / Contribute / Form / UpdateSubscription.php
index a0e51e90d892a4bdb7fcf33d7a84df1d1a5d640a..fa7486f876a7156bf9fbda96d0e6550712cd3b6b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -66,7 +66,9 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
    * @var int
    * @public
    */
-  public $_contactID; function preProcess() {
+  public $_contactID;
+
+  function preProcess() {
 
     $this->_crid = CRM_Utils_Request::retrieve('crid', 'Integer', $this, FALSE);
     if ($this->_crid) {
@@ -128,7 +130,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
    *
    * @access public
    *
-   * @return None
+   * @return void
    */
   function setDefaultValues() {
 
@@ -143,7 +145,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
   /**
    * Function to actually build the components of the form
    *
-   * @return None
+   * @return void
    * @access public
    */
   public function buildQuickForm() {
@@ -185,7 +187,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
    *
    * @access public
    *
-   * @return None
+   * @return void
    */
   public function postProcess() {
     // store the submitted values in an array
@@ -262,7 +264,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
         }
         CRM_Activity_BAO_Activity::create($activityParams);
 
-        if (CRM_Utils_Array::value('is_notify', $params)) {
+        if (!empty($params['is_notify'])) {
           // send notification
           if ($this->_subscriptionDetails->contribution_page_id) {
             CRM_Core_DAO::commonRetrieveAll('CRM_Contribute_DAO_ContributionPage', 'id',
@@ -302,7 +304,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
             'toName' => $donorDisplayName,
             'toEmail' => $donorEmail,
           );
-          list($sent) = CRM_Core_BAO_MessageTemplates::sendTemplate($sendTemplateParams);
+          list($sent) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
         }
       }