Merge pull request #22974 from mattwire/activitytokens
[civicrm-core.git] / CRM / Report / Form / Activity.php
index d91c95e010656be4a116ef8a8289813391fc8bc6..9fda9efae5f821f0b7806785494981d557f7b688 100644 (file)
@@ -700,8 +700,7 @@ GROUP BY civicrm_activity_id $having {$this->_orderBy}";
    */
   public static function formRule($fields, $files, $self) {
     $errors = [];
-    $config = CRM_Core_Config::singleton();
-    if (in_array("CiviCase", $config->enableComponents)) {
+    if (CRM_Core_Component::isEnabled('CiviCase')) {
       $componentId = CRM_Core_Component::getComponentID('CiviCase');
       $caseActivityTypes = CRM_Core_OptionGroup::values('activity_type', TRUE, FALSE, FALSE, " AND v.component_id={$componentId}");
       if (!empty($fields['activity_type_id_value']) && is_array($fields['activity_type_id_value']) && empty($fields['include_case_activities_value'])) {