+ $config = CRM_Core_Config::singleton();
+ $cmsUrl = CRM_Utils_System::languageNegotiationURL($config->userFrameworkBaseURL, FALSE, TRUE);
+ $cmsPath = $this->cmsRootPath();
+ $filesPath = CRM_Utils_File::baseFilePath();
+ $filesRelPath = CRM_Utils_File::relativize($filesPath, $cmsPath);
+ $filesURL = rtrim($cmsUrl, '/') . '/' . ltrim($filesRelPath, ' /');
+ return array(
+ 'url' => CRM_Utils_File::addTrailingSlash($filesURL, '/'),
+ 'path' => CRM_Utils_File::addTrailingSlash($filesPath),
+ );
+ }
+
+ /**
+ * Determine the location of the CiviCRM source tree.
+ *
+ * @return array
+ * - url: string. ex: "http://example.com/sites/all/modules/civicrm"
+ * - path: string. ex: "/var/www/sites/all/modules/civicrm"
+ */
+ public function getCiviSourceStorage() {