From eb8de3d8c67c0a8c25506a610e3eb4385b59c3d8 Mon Sep 17 00:00:00 2001 From: Kurund Jalmi Date: Sun, 28 Apr 2013 00:30:16 -0700 Subject: [PATCH] worked on CRM-12370, add civicrm modules after main civicrm drupal module --- CRM/Utils/Hook/Drupal.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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; -- 2.25.1