if (defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
$this->configAndLogDir = CRM_Utils_File::baseFilePath() . 'ConfigAndLog' . DIRECTORY_SEPARATOR;
- CRM_Utils_File::createDir($this->configAndLogDir);
- CRM_Utils_File::restrictAccess($this->configAndLogDir);
-
$this->templateCompileDir = defined('CIVICRM_TEMPLATE_COMPILEDIR') ? CRM_Utils_File::addTrailingSlash(CIVICRM_TEMPLATE_COMPILEDIR) : NULL;
CRM_Utils_File::createDir($this->templateCompileDir);
CRM_Utils_File::restrictAccess($this->templateCompileDir);
}
+ $civicrm_private = Civi::paths()->getPath('[civicrm.private]');
+ if (!empty($civicrm_private)) {
+ $this->configAndLogDir = rtrim($civicrm_private, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'ConfigAndLog' . DIRECTORY_SEPARATOR;
+ }
+ CRM_Utils_File::createDir($this->configAndLogDir);
+ CRM_Utils_File::restrictAccess($this->configAndLogDir);
+
if (!defined('CIVICRM_UF')) {
$this->fatal('You need to define CIVICRM_UF in civicrm.settings.php');
}
$bootServices = [];
\Civi::$statics[__CLASS__]['boot'] = &$bootServices;
+ $bootServices['paths'] = new \Civi\Core\Paths();
+
$bootServices['runtime'] = $runtime = new \CRM_Core_Config_Runtime();
$runtime->initialize($loadFromDB);
- $bootServices['paths'] = new \Civi\Core\Paths();
-
$class = $runtime->userFrameworkClass;
$bootServices['userSystem'] = $userSystem = new $class();
$userSystem->initialize();
->register('civicrm.files', function () {
return \CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage();
})
+ ->register('civicrm.private', function () {
+ return \CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage();
+ })
->register('wp.frontend.base', function () {
return ['url' => rtrim(CIVICRM_UF_BASEURL, '/') . '/'];
})