Skip to content

Commit

Permalink
BTHAB-205: Check controller class for qfKey when loading legacy searc…
Browse files Browse the repository at this point in the history
…h actions for contributions

Included in -
PR: civicrm#26235
  • Loading branch information
olayiwola-compucorp committed Oct 2, 2023
1 parent 1dba13d commit 1dfcbe8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ 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_Utils_Array::first((array) $task['class']), 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',
Expand Down

0 comments on commit 1dfcbe8

Please sign in to comment.