public static function createBaseConfig() {
$config = \CRM_Core_Config::singleton();
$tmpDir = empty($config->uploadDir) ? Civi::paths()->getVariable('civicrm.compile', 'path') : $config->uploadDir;
- global $civicrm_root;
+ $pkgs = Civi::paths()->getVariable('civicrm.packages', 'path');
return [
'General' => [
'filter_type' => 'xml',
- 'filter_path' => "{$civicrm_root}/packages/IDS/default_filter.xml",
+ 'filter_path' => "{$pkgs}/IDS/default_filter.xml",
'tmp_path' => $tmpDir,
- 'HTML_Purifier_Path' => $civicrm_root . 'packages/IDS/vendors/htmlpurifier/HTMLPurifier.auto.php',
+ 'HTML_Purifier_Path' => $pkgs . '/IDS/vendors/htmlpurifier/HTMLPurifier.auto.php',
'HTML_Purifier_Cache' => $tmpDir,
'scan_keys' => '',
'exceptions' => ['__utmz', '__utmc'],
);
CRM_Utils_JSON::output($error);
}
- CRM_Core_Error::fatal($msg);
+ throw new CRM_Core_Exception($msg);
}
}