Merge pull request #18880 from vingle/master
[civicrm-core.git] / CRM / Campaign / Form / SurveyType.php
index f6b37abe46fe61ff0021e56b1a281d530eabc9c3..08c034416994e1ba307e4d043b2f8d76d90e13a7 100644 (file)
@@ -28,13 +28,6 @@ class CRM_Campaign_Form_SurveyType extends CRM_Admin_Form {
    */
   protected $_gName;
 
-  /**
-   * Id
-   *
-   * @var int
-   */
-  protected $_id;
-
   /**
    * Action
    *
@@ -44,6 +37,8 @@ class CRM_Campaign_Form_SurveyType extends CRM_Admin_Form {
 
   /**
    * Set variables up before form is built.
+   *
+   * @throws \CRM_Core_Exception
    */
   public function preProcess() {
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this);
@@ -66,7 +61,7 @@ class CRM_Campaign_Form_SurveyType extends CRM_Admin_Form {
     if ($this->_id && in_array($this->_gName, CRM_Core_OptionGroup::$_domainIDGroups)) {
       $domainID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $this->_id, 'domain_id', 'id');
       if (CRM_Core_Config::domainID() != $domainID) {
-        CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+        CRM_Core_Error::statusBounce(ts('You do not have permission to access this page.'));
       }
     }
   }