[REF] calculate 'amount' on ContributionPage in a shared way in one scenario
[civicrm-core.git] / CRM / Contribute / Form / CancelSubscription.php
index d65e8d39478a46ac0d914c6290d005e113e1bc75..f8be875bd1297b84c85ec0907aebea40faa440ff 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019                                |
+ | Copyright CiviCRM LLC (c) 2004-2020                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
  */
 
 /**
@@ -53,13 +53,6 @@ class CRM_Contribute_Form_CancelSubscription extends CRM_Contribute_Form_Contrib
     return TRUE;
   }
 
-  /**
-   * Is the from being accessed by a front end user to update their own recurring.
-   *
-   * @var bool
-   */
-  protected $selfService;
-
   /**
    * Set variables up before form is built.
    *
@@ -339,23 +332,4 @@ class CRM_Contribute_Form_CancelSubscription extends CRM_Contribute_Form_Contrib
     }
   }
 
-  /**
-   * Is this being used by a front end user to update their own recurring.
-   *
-   * @return bool
-   */
-  protected function isSelfService() {
-    if (!is_null($this->selfService)) {
-      return $this->selfService;
-    }
-    $this->selfService = FALSE;
-    if (!CRM_Core_Permission::check('edit contributions')) {
-      if ($this->_subscriptionDetails->contact_id != $this->getContactID()) {
-        CRM_Core_Error::statusBounce(ts('You do not have permission to cancel this recurring contribution.'));
-      }
-      $this->selfService = TRUE;
-    }
-    return $this->selfService;
-  }
-
 }