Skip to content
Snippets Groups Projects
Commit 2f0c1805 authored by root's avatar root
Browse files

Fix on the removal of centrally managed modules

parent cd3f6d6b
Branches
Tags
No related merge requests found
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
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment