Skip to content

Commit

Permalink
Merge pull request #26235 from ufundo/getsearchtasks-qfkey-for-page-c…
Browse files Browse the repository at this point in the history
…allback

dev/core#4295 SearchKit: check controller class for qfKey when loading legacy search actions for contributions
colemanw authored May 16, 2023
2 parents a599e40 + 820493f commit 70c2b33
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -193,7 +193,10 @@ public function _run(\Civi\Api4\Generic\Result $result) {
// FIXME: tasks() function always checks permissions, should respect `$this->checkPermissions`
foreach (\CRM_Contribute_Task::tasks() as $id => $task) {
if (!empty($task['url'])) {
$key = \CRM_Core_Key::get('CRM_Contribute_Controller_Task', TRUE);
$path = explode('?', $task['url'], 2)[0];
$menu = \CRM_Core_Menu::get($path);
$key = \CRM_Core_Key::get($menu['page_callback'], TRUE);

$tasks[$entity['name']]['contribution.' . $id] = [
'title' => $task['title'],
'icon' => $task['icon'] ?? 'fa-gear',

0 comments on commit 70c2b33

Please sign in to comment.