Merge pull request #15214 from civicrm/5.17
[civicrm-core.git] / CRM / Grant / Form / Task.php
index 26ce02f77bd826eda7b0a50491b05839882b1f80..1cc6fddb24b6bccfb9b0f96ed0c9821c2ddae925 100644 (file)
@@ -61,9 +61,9 @@ class CRM_Grant_Form_Task extends CRM_Core_Form_Task {
    * @param CRM_Core_Form $form
    */
   public static function preProcessCommon(&$form) {
-    $form->_grantIds = array();
+    $form->_grantIds = [];
 
-    $values = $form->controller->exportValues('Search');
+    $values = $form->controller->exportValues($form->get('searchFormName'));
 
     $form->_task = $values['task'];
     $tasks = CRM_Grant_Task::tasks();
@@ -72,7 +72,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form_Task {
     }
     $form->assign('taskName', $tasks[$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) {
@@ -137,18 +137,17 @@ class CRM_Grant_Form_Task extends CRM_Core_Form_Task {
    * @param bool $submitOnce
    */
   public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
-    $this->addButtons(array(
-        array(
-          'type' => $nextType,
-          'name' => $title,
-          'isDefault' => TRUE,
-        ),
-        array(
-          'type' => $backType,
-          'name' => ts('Cancel'),
-        ),
-      )
-    );
+    $this->addButtons([
+      [
+        'type' => $nextType,
+        'name' => $title,
+        'isDefault' => TRUE,
+      ],
+      [
+        'type' => $backType,
+        'name' => ts('Cancel'),
+      ],
+    ]);
   }
 
 }