Merge pull request #18590 from eileenmcnaughton/taskname
authorMatthew Wire <mjw@mjwconsult.co.uk>
Mon, 28 Sep 2020 10:30:52 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Mon, 28 Sep 2020 10:30:52 +0000 (11:30 +0100)
[REF] Remove unused taskName variable

1  2 
CRM/Activity/Form/Task.php
CRM/Contact/Form/Task.php
CRM/Contribute/Form/Task.php
CRM/Core/Form/Task.php
CRM/Event/Form/Task.php
CRM/Grant/Form/Task.php
CRM/Mailing/Form/Task.php
CRM/Member/Form/Task.php

index 470e3692e8df4ac3af5ba8048516d4bf8cce61ca,2b550eb813ae4e1c9c4528185d22e744325119b9..3be85d5bc3025648c3dd67e80dce747db8142542
@@@ -45,11 -45,9 +45,9 @@@ class CRM_Activity_Form_Task extends CR
    public static function preProcessCommon(&$form) {
      $form->_activityHolderIds = [];
  
 -    $values = $form->controller->exportValues($form->get('searchFormName'));
 +    $values = $form->getSearchFormValues();
  
      $form->_task = $values['task'];
-     $activityTasks = CRM_Activity_Task::tasks();
-     $form->assign('taskName', $activityTasks[$form->_task]);
  
      $ids = [];
      if ($values['radio_ts'] == 'ts_sel') {
Simple merge
index ce5b071fa9bbe61631cd436872e3f16c8e52bb2f,e2f24b6562e5fa196e8e5cdad2a9d91f07aee465..e6cc4ea750453eb9c129213d27aee29c97ce33af
@@@ -57,11 -55,9 +57,9 @@@ class CRM_Contribute_Form_Task extends 
    public static function preProcessCommon(&$form) {
      $form->_contributionIds = [];
  
 -    $values = $form->controller->exportValues($form->get('searchFormName'));
 +    $values = $form->getSearchFormValues();
  
      $form->_task = $values['task'] ?? NULL;
-     $contributeTasks = CRM_Contribute_Task::tasks();
-     $form->assign('taskName', CRM_Utils_Array::value($form->_task, $contributeTasks));
  
      $ids = [];
      if (isset($values['radio_ts']) && $values['radio_ts'] == 'ts_sel') {
index 65a105d3878cc0215f6582d1d047ba75d4257b3c,579eefc533e70631a754f549f8a879e5b6a05c8f..2bc0033da6707fe65734b9516ccb6b6349148583
@@@ -92,12 -92,9 +92,9 @@@ abstract class CRM_Core_Form_Task exten
    public static function preProcessCommon(&$form) {
      $form->_entityIds = [];
  
 -    $searchFormValues = $form->controller->exportValues($form->get('searchFormName'));
 +    $searchFormValues = $form->getSearchFormValues();
  
      $form->_task = $searchFormValues['task'];
-     $className = 'CRM_' . ucfirst($form::$entityShortname) . '_Task';
-     $entityTasks = $className::tasks();
-     $form->assign('taskName', $entityTasks[$form->_task]);
  
      $entityIds = [];
      if ($searchFormValues['radio_ts'] == 'ts_sel') {
Simple merge
Simple merge
index f7f37eee39cd509724e0ba2efac1ff87255c8b20,154a04ed3a34e48dfa558ae6aaea89768f0ef863..0b0402be93e7357ef4585d8416fe9666d4c4af65
@@@ -29,16 -29,12 +29,14 @@@ class CRM_Mailing_Form_Task extends CRM
    }
  
    /**
 -   * @param CRM_Core_Form $form
 +   * @param \CRM_Core_Form_Task $form
 +   *
 +   * @throws \CRM_Core_Exception
     */
    public static function preProcessCommon(&$form) {
 -    $values = $form->controller->exportValues($form->get('searchFormName'));
 +    $values = $form->getSearchFormValues();
  
      $form->_task = $values['task'] ?? NULL;
-     $mailingTasks = CRM_Mailing_Task::tasks();
-     $form->assign('taskName', CRM_Utils_Array::value('task', $values));
  
      // ids are mailing event queue ids
      $ids = [];
Simple merge