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 21ad61932c16..226305d1692e 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 @@ public function __construct($title = NULL, $modal = TRUE, $action = CRM_Core_Act // 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 8089ddd23fc3..520c3f9442b7 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $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 4a4b47cc3f46..bfc16d3c89b8 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $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 6d2d1c4f83e2..af1ca61955c8 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 @@ public function __construct($title = NULL, $modal = TRUE, $action = CRM_Core_Act // 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 0fb964ed776c..88b41e4e6d8d 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $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 927c9422fe53..1206ecee06e3 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod // 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 166cb93e9fef..e68d6e91f87f 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $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 02ca8b7ff692..b4cfb3301d43 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $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 527375d07d0b..4b532f2053f8 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 @@ public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $mod $this->addPages($this->_stateMachine, $action); // add all the actions - $config = CRM_Core_Config::singleton(); $this->addActions(); + $this->set('entity', $this->entity); } }