Merge pull request #15818 from colemanw/fields
[civicrm-core.git] / CRM / Activity / Form / Task.php
index 7cc1176a6bc0df8b772e2653f919397b816a72df..1ee135bd7f2565a2617dc3846c7f38c3a941d6dd 100644 (file)
@@ -1,34 +1,18 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 5                                                  |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
+ | Copyright CiviCRM LLC. All rights reserved.                        |
  |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ | This work is published under the GNU AGPLv3 license with some      |
+ | permitted exceptions and without any warranty. For full license    |
+ | and copyright information, see https://civicrm.org/licensing       |
  +--------------------------------------------------------------------+
  */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC https://civicrm.org/licensing
  */
 
 /**
@@ -57,7 +41,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
    * @param CRM_Core_Form $form
    */
   public static function preProcessCommon(&$form) {
-    $form->_activityHolderIds = array();
+    $form->_activityHolderIds = [];
 
     $values = $form->controller->exportValues($form->get('searchFormName'));
 
@@ -65,7 +49,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
     $activityTasks = CRM_Activity_Task::tasks();
     $form->assign('taskName', $activityTasks[$form->_task]);
 
-    $ids = array();
+    $ids = [];
     if ($values['radio_ts'] == 'ts_sel') {
       foreach ($values as $name => $value) {
         if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) {
@@ -85,7 +69,7 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
       $activityClause = NULL;
 
       $components = CRM_Core_Component::getNames();
-      $componentClause = array();
+      $componentClause = [];
       foreach ($components as $componentID => $componentName) {
         if ($componentName != 'CiviCase' && !CRM_Core_Permission::check("access $componentName")) {
           $componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
@@ -163,17 +147,17 @@ WHERE  activity_id IN ( $IDs ) AND
    * @param bool $submitOnce
    */
   public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
-    $this->addButtons(array(
-      array(
+    $this->addButtons([
+      [
         'type' => $nextType,
         'name' => $title,
         'isDefault' => TRUE,
-      ),
-      array(
+      ],
+      [
         'type' => $backType,
         'name' => ts('Cancel'),
-      ),
-    ));
+      ],
+    ]);
   }
 
 }