From 233e08f1b0d3b632c5c9c92f3579c4659ba6339d Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 14 Oct 2020 16:41:19 +1300 Subject: [PATCH] Fix unreleased regression on search tasks from basic search --- CRM/Activity/Controller/Search.php | 3 +++ CRM/Campaign/Controller/Search.php | 4 +++- CRM/Case/Controller/Search.php | 4 +++- CRM/Contact/Controller/Search.php | 3 +++ CRM/Contribute/Controller/Search.php | 5 +++++ CRM/Event/Controller/Search.php | 3 +++ CRM/Grant/Controller/Search.php | 4 +++- CRM/Member/Controller/Search.php | 4 +++- CRM/Pledge/Controller/Search.php | 4 +++- 9 files changed, 29 insertions(+), 5 deletions(-) diff --git a/CRM/Activity/Controller/Search.php b/CRM/Activity/Controller/Search.php index 21ad61932c..226305d169 100644 --- a/CRM/Activity/Controller/Search.php +++ b/CRM/Activity/Controller/Search.php @@ -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); } /** diff --git a/CRM/Campaign/Controller/Search.php b/CRM/Campaign/Controller/Search.php index 8089ddd23f..520c3f9442 100644 --- a/CRM/Campaign/Controller/Search.php +++ b/CRM/Campaign/Controller/Search.php @@ -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); } } diff --git a/CRM/Case/Controller/Search.php b/CRM/Case/Controller/Search.php index 4a4b47cc3f..bfc16d3c89 100644 --- a/CRM/Case/Controller/Search.php +++ b/CRM/Case/Controller/Search.php @@ -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); } } diff --git a/CRM/Contact/Controller/Search.php b/CRM/Contact/Controller/Search.php index 6d2d1c4f83..af1ca61955 100644 --- a/CRM/Contact/Controller/Search.php +++ b/CRM/Contact/Controller/Search.php @@ -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); } /** diff --git a/CRM/Contribute/Controller/Search.php b/CRM/Contribute/Controller/Search.php index 0fb964ed77..88b41e4e6d 100644 --- a/CRM/Contribute/Controller/Search.php +++ b/CRM/Contribute/Controller/Search.php @@ -27,12 +27,16 @@ */ 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); } } diff --git a/CRM/Event/Controller/Search.php b/CRM/Event/Controller/Search.php index 927c9422fe..1206ecee06 100644 --- a/CRM/Event/Controller/Search.php +++ b/CRM/Event/Controller/Search.php @@ -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); } } diff --git a/CRM/Grant/Controller/Search.php b/CRM/Grant/Controller/Search.php index 166cb93e9f..e68d6e91f8 100644 --- a/CRM/Grant/Controller/Search.php +++ b/CRM/Grant/Controller/Search.php @@ -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); } } diff --git a/CRM/Member/Controller/Search.php b/CRM/Member/Controller/Search.php index 02ca8b7ff6..b4cfb3301d 100644 --- a/CRM/Member/Controller/Search.php +++ b/CRM/Member/Controller/Search.php @@ -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); } } diff --git a/CRM/Pledge/Controller/Search.php b/CRM/Pledge/Controller/Search.php index 527375d07d..4b532f2053 100644 --- a/CRM/Pledge/Controller/Search.php +++ b/CRM/Pledge/Controller/Search.php @@ -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); } } -- 2.25.1