CRM-17860 - CRM_Utils_System_WordPress - Path lookup
authorTim Otten <totten@civicrm.org>
Sat, 23 Jan 2016 05:50:41 +0000 (21:50 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 23 Jan 2016 05:56:41 +0000 (21:56 -0800)
commit8ce9d9d6ad0c3a36de942049c45dce72fa95ab6f
treeb1c16f3a96b5286e2f5b6d6bde4faa9f62b81202
parent4f55ba21ec0fbe2e26bb3f5083d3d00a2037ff6f
CRM-17860 - CRM_Utils_System_WordPress - Path lookup

The implementations of `getDefaultFileStorage()` and
`getCiviSourceStorage()` depended on having the CMS bootstrapped, causing
failures in scripts that boot Civi first.

This patch computes those values by doing some arithmetic, e.g.
 * Civi source URL == CMS Base URL + relative path to source tree
 * Civi file URL == CMS Base URL + relative path to files dir

----------------------------------------
* CRM-17860: More consistent, flexible handling of tests for extensions
  https://issues.civicrm.org/jira/browse/CRM-17860
CRM/Utils/System/WordPress.php