forked from civicrm/civicrm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Civi::paths() - Decouple settings from paths. Allow path vars.
There has been a policy underwhich paths and URLs are assumed to be relative to different points (urls => webroot; paths => sites/*/files/civicrm). For some settings, this is fairly confusing. The policy had been encoded in `SettingsBag::getPath` and `SettingsBag::getUrl`. It's particularly confusing because (sometimes) the default value of a specific property isn't really aligned with the policy. This revision attempts to cleanup in two ways: 1. It removes policy from `SettingsBag` and puts it in `Civi\Core\Paths`. 2. It makes the policy less important by allowing variables in the paths. * `[civicrm.files]/upload` might evaluate to `/var/www/sites/default/files/civicrm/upload` * `[cms.root]/myuploads` might evaluate to `/var/www/myuploads` The revision also updates MagicMerge to store various path and URL policies in `getPropertyMap()` rather than adhoc callbacks.
- Loading branch information
Showing
9 changed files
with
308 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.