diff --git a/cern_integration.info b/cern_integration.info index 5f204d0c04ecddab971c4cb99b0315edb2a3d937..277e15e8f433cc5b8bcd0c2f4efec551ee890fb8 100644 --- a/cern_integration.info +++ b/cern_integration.info @@ -1,7 +1,7 @@ name = CERN Integration package = CERN description = Provides CERN site integration for Drupal. -version = "7.X-1.10" +version = "7.X-1.11" core = 7.x dependencies[] = shib_auth diff --git a/cern_integration.module b/cern_integration.module index 0e63fc26eb507564a6d91377babf6f592df46459..df592f4662db996f4d0db875480758b2e30346ac 100644 --- a/cern_integration.module +++ b/cern_integration.module @@ -561,12 +561,14 @@ function cern_integration_form_domain_301_redirect_admin_form_alter(&$form, &$fo function cern_integration_update_projects_alter(&$projects) { // Remove all centrally managed modules. - foreach (module_list() as $module) { - if (preg_match('/^sites\/all\/modules\//', drupal_get_path('module', $module))) { - // This works only if the module name matches the project name. - unset($projects[$module]); + foreach (system_list("module_enabled") as $module) { + if (preg_match('/^sites\/all\/modules\//', drupal_get_path('module', $module->name))) { + if(isset($module->info["project"])){ + unset($projects[$module->info["project"]]); + } } } + // Remove all centrally managed themes and their subthemes. $array_themes = list_themes(); foreach ($array_themes as $theme_obj) {