From: Kurund Jalmi Date: Sun, 28 Apr 2013 07:30:16 +0000 (-0700) Subject: worked on CRM-12370, add civicrm modules after main civicrm drupal module X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb8de3d8c67c0a8c25506a610e3eb4385b59c3d8;p=civicrm-core.git worked on CRM-12370, add civicrm modules after main civicrm drupal module --- diff --git a/CRM/Utils/Hook/Drupal.php b/CRM/Utils/Hook/Drupal.php index b998aeb71e..e5e8b71259 100644 --- a/CRM/Utils/Hook/Drupal.php +++ b/CRM/Utils/Hook/Drupal.php @@ -84,7 +84,18 @@ class CRM_Utils_Hook_Drupal extends CRM_Utils_Hook { $this->requireCiviModules($this->civiModules); } - $this->allModules = array_merge((array)$this->drupalModules, (array)$this->civiModules); + // we should add civicrm's module's just after main civicrm drupal module + foreach($this->drupalModules as $moduleName) { + $this->allModules[$moduleName] = $moduleName; + if ( $moduleName == 'civicrm' ) { + if (!empty($this->civiModules)) { + foreach( $this->civiModules as $civiModuleName) { + $this->allModules[$civiModules] = $civiModuleName; + } + } + } + } + if ($this->drupalModules !== NULL && $this->civiModules !== NULL) { // both CRM and CMS have bootstrapped, so this is the final list $this->isBuilt = TRUE;