Skip to content

Commit

Permalink
Fix caching on campaign pseudoconstant
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Aug 11, 2021
1 parent 1198660 commit bf29d78
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions CRM/Campaign/BAO/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,11 @@ public static function getPermissionedCampaigns(

/**
* Is CiviCampaign enabled.
*
* @return bool
*/
public static function isCampaignEnable() {
static $isEnable = NULL;

if (!isset($isEnable)) {
$isEnable = FALSE;
$config = CRM_Core_Config::singleton();
if (in_array('CiviCampaign', $config->enableComponents)) {
$isEnable = TRUE;
}
}

return $isEnable;
public static function isCampaignEnable(): bool {
return in_array('CiviCampaign', CRM_Core_Config::singleton()->enableComponents, TRUE);
}

/**
Expand Down

0 comments on commit bf29d78

Please sign in to comment.