*/
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'])) {