CRM-19303 - Drupal - Fix various path computations for multisite
authorTim Otten <totten@civicrm.org>
Thu, 15 Jun 2017 06:42:59 +0000 (23:42 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 15 Jun 2017 08:27:09 +0000 (01:27 -0700)
commit4ac7577d9710095019c911d80c4ad48163b4e403
tree6ff7fc2cf89e1841192c13dc2660e6a193c26533
parent3c3f4a77879a70e4569ae2f5d7b050eb20e1bc7b
CRM-19303 - Drupal - Fix various path computations for multisite

A few changes:
 * Move logic out of `CRM_Utils_System_Base` to `CRM_Utils_System_DrupalBase`
   so that it's easier to read.
 * Update `[civicrm.files]`:  First, try to use `sites/{$name}/files/civicrm`.
   Otherwise, use `sites/default/files/civicrm`.
    * Note: The `$name` is parsed/validated the same way as `civicrm.config.php`.
      It takes the full HTTP_HOST and then tries various substrings.
 * Update `[civicrm.root]`:  Compare `$civicrm_root` and `cmsRootPath()`
   to determine the relative path.  Then, combine `CIVICRM_UF_BASEURL` with
   relpath.  (This is the same as WordPress.)
CRM/Utils/System/Base.php
CRM/Utils/System/DrupalBase.php