CRM-17711 - Work with Backdrop `civicrm.module` in `./backdrop/` or `./drupal/`
authorTim Otten <totten@civicrm.org>
Wed, 16 Dec 2015 06:54:42 +0000 (22:54 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 17 Dec 2015 04:32:06 +0000 (20:32 -0800)
.gitignore
CRM/Core/CodeGen/Config.php
CRM/Utils/System/DrupalBase.php

index b6b605e2ce11822045d8b50d12418c59a210f587..4a5a379e1ba841a9f3baacc32b0f4dd303b0e405 100644 (file)
@@ -1,5 +1,6 @@
 *~
 *.bak
+backdrop/
 bower_components
 CRM/ACL/DAO
 CRM/Activity/DAO
index 2dd6e211cb06a1c36ed491e8e01979786675f96f..74c7a59fb29b7d6cf7ec621ba1d4d6d7c0928eaa 100644 (file)
@@ -54,6 +54,8 @@ class CRM_Core_CodeGen_Config extends CRM_Core_CodeGen_BaseTask {
     switch ($cms) {
       case 'backdrop':
         // FIXME!!!!
+        $candidates[] = "../backdrop/civicrm.config.php.backdrop";
+        $candidates[] = "../../backdrop/civicrm.config.php.backdrop";
         $candidates[] = "../drupal/civicrm.config.php.backdrop";
         $candidates[] = "../../drupal/civicrm.config.php.backdrop";
         break;
index 2b0019a81ce20b8d57e8d93d575f92c6ca718904..923994fbfadcb27d17f2fe703d3dc050bfbf4314 100644 (file)
@@ -106,7 +106,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
     // Handle relative urls that are within the CiviCRM module directory
     elseif (strpos($url, $base) === 0) {
       $internal = TRUE;
-      $url = $this->appendCoreDirectoryToResourceBase(substr(drupal_get_path('module', 'civicrm'), 0, -6)) . trim(substr($url, strlen($base)), '/');
+      $url = $this->appendCoreDirectoryToResourceBase(dirname(drupal_get_path('module', 'civicrm')) . '/') . trim(substr($url, strlen($base)), '/');
     }
     // Strip query string
     $q = strpos($url, '?');