Update copyright date for 2020
[civicrm-core.git] / CRM / Campaign / Form / Survey / Delete.php
index 94187cee41cfc501afa2a6b632aed39cc61f7665..3d04adc7d9bf02a556b978397080869572858336 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018                                |
+ | Copyright CiviCRM LLC (c) 2004-2020                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2020
  */
 
 /**
@@ -50,7 +50,6 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form {
    */
   protected $_surveyTitle;
 
-
   /**
    * Set variables up before form is built.
    */
@@ -60,7 +59,7 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form {
     }
 
     $this->_surveyId = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
-    $params = array('id' => $this->_surveyId);
+    $params = ['id' => $this->_surveyId];
     CRM_Campaign_BAO_Survey::retrieve($params, $surveyInfo);
     $this->_surveyTitle = $surveyInfo['title'];
     $this->assign('surveyTitle', $this->_surveyTitle);
@@ -71,18 +70,17 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form {
    * Build the form object.
    */
   public function buildQuickForm() {
-    $this->addButtons(array(
-        array(
-          'type' => 'next',
-          'name' => ts('Delete'),
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => 'cancel',
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
+    $this->addButtons([
+      [
+        'type' => 'next',
+        'name' => ts('Delete'),
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
   /**
@@ -91,7 +89,7 @@ class CRM_Campaign_Form_Survey_Delete extends CRM_Core_Form {
   public function postProcess() {
     if ($this->_surveyId) {
       CRM_Campaign_BAO_Survey::del($this->_surveyId);
-      CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", array(1 => $this->_surveyTitle)), 'success');
+      CRM_Core_Session::setStatus('', ts("'%1' survey has been deleted.", [1 => $this->_surveyTitle]), 'success');
       CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
     }
     else {