Remove unused instances of useTable var
authoreileen <emcnaughton@wikimedia.org>
Wed, 20 Jun 2018 00:38:41 +0000 (12:38 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 20 Jun 2018 00:47:29 +0000 (12:47 +1200)
CRM/Activity/Form/Task.php
CRM/Contact/Form/Task.php
CRM/Contribute/Form/Task.php
CRM/Event/Form/Task.php
CRM/Grant/Form/Task.php
CRM/Mailing/Form/Task.php
CRM/Member/Form/Task.php
CRM/Pledge/Form/Task.php

index 3ec9429bee13ea00b181ac518f0f4f8f3e33d862..3a052beec467105460210501ced3edefbe120892 100644 (file)
@@ -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'));
index 27edba918fb9e9395abef9707eca76eb796e4bce..377c360b54111bbe9e2b36b9cacb4f6b6b992b55 100644 (file)
@@ -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));
index 70cf6325cef09c0cf42fc77163f75e97bba4352c..f089448db49c37ab3ebf243e8b2d7a91cf6caf1d 100644 (file)
@@ -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'));
index 00331ddb28d7a8c2aa3b0ad68a85d22d52ba15f1..cc7df4d31d5f8673e4bd4fb61733395faa3d505c 100644 (file)
@@ -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'));
index fc1e831f98b34b10c25138392cfd20992059e8c5..24322acae0136df28dd75b6e71c83d4eddb8dac6 100644 (file)
@@ -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');
index c241e191dc6f1148ebd37804c34219858435d0c0..dc9290be3fccbc53436f99f3900fefeb0068d9e8 100644 (file)
@@ -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);
index a093365a0e2ef778c257c9d148eaf4658c487317..e8c6e9bfe11c5316be1eb8095dec030bcd1fce99 100644 (file)
@@ -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'));
index dd5946e5c7a16cfcf622d9a540a912d7b483eee6..4a8b85561449a409c5fc3beac7be79bbe4698658 100644 (file)
@@ -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');