From 2b089ce1116f3d9c4c9e975704920529e4f3d5f9 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 20 Jun 2018 12:38:41 +1200 Subject: [PATCH] Remove unused instances of useTable var --- CRM/Activity/Form/Task.php | 3 +-- CRM/Contact/Form/Task.php | 6 ++++-- CRM/Contribute/Form/Task.php | 3 +-- CRM/Event/Form/Task.php | 3 +-- CRM/Grant/Form/Task.php | 3 +-- CRM/Mailing/Form/Task.php | 3 +-- CRM/Member/Form/Task.php | 3 +-- CRM/Pledge/Form/Task.php | 3 +-- 8 files changed, 11 insertions(+), 16 deletions(-) diff --git a/CRM/Activity/Form/Task.php b/CRM/Activity/Form/Task.php index 3ec9429bee..3a052beec4 100644 --- a/CRM/Activity/Form/Task.php +++ b/CRM/Activity/Form/Task.php @@ -55,9 +55,8 @@ class CRM_Activity_Form_Task extends CRM_Core_Form_Task { * Common pre-process function. * * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_activityHolderIds = array(); $values = $form->controller->exportValues($form->get('searchFormName')); diff --git a/CRM/Contact/Form/Task.php b/CRM/Contact/Form/Task.php index 27edba918f..377c360b54 100644 --- a/CRM/Contact/Form/Task.php +++ b/CRM/Contact/Form/Task.php @@ -94,12 +94,14 @@ class CRM_Contact_Form_Task extends CRM_Core_Form_Task { * Common pre-processing function. * * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_contactIds = array(); $form->_contactTypes = array(); + $formName = CRM_Utils_System::getClassName($form->controller->getStateMachine()); + $useTable = ($formName !== 'CRM_Export_StateMachine_Standalone') ? TRUE : FALSE; + $isStandAlone = in_array('task', $form->urlPath) || in_array('standalone', $form->urlPath); if ($isStandAlone) { list($form->_task, $title) = CRM_Contact_Task::getTaskAndTitleByClass(get_class($form)); diff --git a/CRM/Contribute/Form/Task.php b/CRM/Contribute/Form/Task.php index 70cf6325ce..f089448db4 100644 --- a/CRM/Contribute/Form/Task.php +++ b/CRM/Contribute/Form/Task.php @@ -67,9 +67,8 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form_Task { /** * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_contributionIds = array(); $values = $form->controller->exportValues($form->get('searchFormName')); diff --git a/CRM/Event/Form/Task.php b/CRM/Event/Form/Task.php index 00331ddb28..cc7df4d31d 100644 --- a/CRM/Event/Form/Task.php +++ b/CRM/Event/Form/Task.php @@ -59,9 +59,8 @@ class CRM_Event_Form_Task extends CRM_Core_Form_Task { /** * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_participantIds = array(); $values = $form->controller->exportValues($form->get('searchFormName')); diff --git a/CRM/Grant/Form/Task.php b/CRM/Grant/Form/Task.php index fc1e831f98..24322acae0 100644 --- a/CRM/Grant/Form/Task.php +++ b/CRM/Grant/Form/Task.php @@ -59,9 +59,8 @@ class CRM_Grant_Form_Task extends CRM_Core_Form_Task { /** * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_grantIds = array(); $values = $form->controller->exportValues('Search'); diff --git a/CRM/Mailing/Form/Task.php b/CRM/Mailing/Form/Task.php index c241e191dc..dc9290be3f 100644 --- a/CRM/Mailing/Form/Task.php +++ b/CRM/Mailing/Form/Task.php @@ -46,9 +46,8 @@ class CRM_Mailing_Form_Task extends CRM_Core_Form_Task { /** * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $values = $form->controller->exportValues($form->get('searchFormName')); $form->_task = CRM_Utils_Array::value('task', $values); diff --git a/CRM/Member/Form/Task.php b/CRM/Member/Form/Task.php index a093365a0e..e8c6e9bfe1 100644 --- a/CRM/Member/Form/Task.php +++ b/CRM/Member/Form/Task.php @@ -59,9 +59,8 @@ class CRM_Member_Form_Task extends CRM_Core_Form_Task { /** * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_memberIds = array(); $values = $form->controller->exportValues($form->get('searchFormName')); diff --git a/CRM/Pledge/Form/Task.php b/CRM/Pledge/Form/Task.php index dd5946e5c7..4a8b855614 100644 --- a/CRM/Pledge/Form/Task.php +++ b/CRM/Pledge/Form/Task.php @@ -55,9 +55,8 @@ class CRM_Pledge_Form_Task extends CRM_Core_Form_Task { * Common pre-processing. * * @param CRM_Core_Form $form - * @param bool $useTable */ - public static function preProcessCommon(&$form, $useTable = FALSE) { + public static function preProcessCommon(&$form) { $form->_pledgeIds = array(); $values = $form->controller->exportValues('Search'); -- 2.25.1