Skip to content

Commit

Permalink
Merge pull request #21147 from eileenmcnaughton/541
Browse files Browse the repository at this point in the history
dev/core#2758 fix task tiles
  • Loading branch information
seamuslee001 authored Aug 15, 2021
2 parents 867ceba + 95913c7 commit 43da425
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class CRM_Core_Task {
*
* @var array
*/
public static $_tasks = NULL;
public static $_tasks = [];

/**
* @var string
Expand Down
5 changes: 2 additions & 3 deletions CRM/Member/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static function taskTitles() {
* set of tasks that are valid for the user
*/
public static function permissionedTaskTitles($permission, $params = []) {
$tasks = self::getTitlesFilteredByPermission(self::$_tasks, $permission === CRM_Core_Permission::EDIT);
$tasks = self::getTitlesFilteredByPermission(self::tasks(), $permission === CRM_Core_Permission::EDIT);
return parent::corePermissionedTaskTitles($tasks, $permission, $params);
}

Expand All @@ -165,8 +165,7 @@ public static function permissionedTaskTitles($permission, $params = []) {
* the set of tasks for a group of members
*/
public static function getTask($value) {
self::tasks();
if (!$value || empty(self::$_tasks[$value])) {
if (!$value || empty(self::tasks()[$value])) {
// Make the print task the default
$value = self::TASK_PRINT;
}
Expand Down

0 comments on commit 43da425

Please sign in to comment.