Fix unreleased regression on search tasks from basic search
authoreileen <emcnaughton@wikimedia.org>
Wed, 14 Oct 2020 03:41:19 +0000 (16:41 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 14 Oct 2020 03:41:19 +0000 (16:41 +1300)
CRM/Activity/Controller/Search.php
CRM/Campaign/Controller/Search.php
CRM/Case/Controller/Search.php
CRM/Contact/Controller/Search.php
CRM/Contribute/Controller/Search.php
CRM/Event/Controller/Search.php
CRM/Grant/Controller/Search.php
CRM/Member/Controller/Search.php
CRM/Pledge/Controller/Search.php

index 21ad61932c161c3d39980ca00ddabbbc8691ead2..226305d1692e6e0e7f14893c1a08a478c7679fd7 100644 (file)
@@ -28,6 +28,8 @@
  */
 class CRM_Activity_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Activity';
+
   /**
    * Class constructor.
    *
@@ -46,6 +48,7 @@ class CRM_Activity_Controller_Search extends CRM_Core_Controller {
 
     // Add all the actions.
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
   /**
index 8089ddd23fc371c3d73d628a30d1e320bea89836..520c3f9442b73eb44f0b79c06136eae532e422fb 100644 (file)
@@ -28,6 +28,8 @@
  */
 class CRM_Campaign_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Campaign';
+
   /**
    * Class constructor.
    *
@@ -45,8 +47,8 @@ class CRM_Campaign_Controller_Search extends CRM_Core_Controller {
     $this->addPages($this->_stateMachine, $action);
 
     // add all the actions
-    $config = CRM_Core_Config::singleton();
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }
index 4a4b47cc3f46e09cae41c25230be17f9d9e386a7..bfc16d3c89b8815bd95ddbc32b87a34f79063b88 100644 (file)
@@ -28,6 +28,8 @@
  */
 class CRM_Case_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Case';
+
   /**
    * Class constructor.
    *
@@ -45,8 +47,8 @@ class CRM_Case_Controller_Search extends CRM_Core_Controller {
     $this->addPages($this->_stateMachine, $action);
 
     // add all the actions
-    $config = CRM_Core_Config::singleton();
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }
index 6d2d1c4f83e2cc42c5391f0e1f077af6c0ae65e2..af1ca61955c8a9134fe4ae1bb6ebe31cf6aa314f 100644 (file)
@@ -27,6 +27,8 @@
  */
 class CRM_Contact_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Contact';
+
   /**
    * Class constructor.
    *
@@ -44,6 +46,7 @@ class CRM_Contact_Controller_Search extends CRM_Core_Controller {
 
     // add all the actions
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
   /**
index 0fb964ed776c4bc98f229ec77a90b732dec44ce3..88b41e4e6d8da8a2ae7e2a35f6ee327676bd80ed 100644 (file)
  */
 class CRM_Contribute_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Contribution';
+
   /**
    * Class constructor.
    *
    * @param string $title
    * @param bool|int $action
    * @param bool $modal
+   *
+   * @throws \CRM_Core_Exception
    */
   public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
 
@@ -40,6 +44,7 @@ class CRM_Contribute_Controller_Search extends CRM_Core_Controller {
     $this->_stateMachine = new CRM_Contribute_StateMachine_Search($this, $action);
     $this->addPages($this->_stateMachine, $action);
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }
index 927c9422fe53ed306733c892647849f89131a7f1..1206ecee06e3945f4a0cf5321d4d105115089220 100644 (file)
@@ -22,6 +22,8 @@
  */
 class CRM_Event_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Participant';
+
   /**
    * Class constructor.
    *
@@ -56,6 +58,7 @@ class CRM_Event_Controller_Search extends CRM_Core_Controller {
 
     // add all the actions
     $this->addActions($uploadDir, $uploadNames);
+    $this->set('entity', $this->entity);
   }
 
 }
index 166cb93e9fef96619e9babdb80c07d0eeef204f6..e68d6e91f87fa0cd4e0d5026324646403de460d3 100644 (file)
@@ -28,6 +28,8 @@
  */
 class CRM_Grant_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Grant';
+
   /**
    * Class constructor.
    *
@@ -45,8 +47,8 @@ class CRM_Grant_Controller_Search extends CRM_Core_Controller {
     $this->addPages($this->_stateMachine, $action);
 
     // add all the actions
-    $config = CRM_Core_Config::singleton();
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }
index 02ca8b7ff692bf13c036725a4e4fe59c29669567..b4cfb3301d43f9c7f84e6542212b86d6663a94c4 100644 (file)
@@ -28,6 +28,8 @@
  */
 class CRM_Member_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Membership';
+
   /**
    * Class constructor.
    *
@@ -45,8 +47,8 @@ class CRM_Member_Controller_Search extends CRM_Core_Controller {
     $this->addPages($this->_stateMachine, $action);
 
     // add all the actions
-    $config = CRM_Core_Config::singleton();
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }
index 527375d07d0ba5da25f6985662969509460ad5eb..4b532f2053f88dc9cde85ab7ee2d3892aa34936c 100644 (file)
@@ -27,6 +27,8 @@
  */
 class CRM_Pledge_Controller_Search extends CRM_Core_Controller {
 
+  protected $entity = 'Pledge';
+
   /**
    * Class constructor.
    *
@@ -44,8 +46,8 @@ class CRM_Pledge_Controller_Search extends CRM_Core_Controller {
     $this->addPages($this->_stateMachine, $action);
 
     // add all the actions
-    $config = CRM_Core_Config::singleton();
     $this->addActions();
+    $this->set('entity', $this->entity);
   }
 
 }