function hostmaster_setup_optional_modules in Hostmaster (Aegir) 5.x
Enable optional modules, if present
1 call to hostmaster_setup_optional_modules()
- hostmaster_profile_final in ./
hostmaster.profile - Perform any final installation tasks for this profile.
File
- ./
hostmaster.profile, line 342
Code
function hostmaster_setup_optional_modules() {
$optional = array(
'admin_menu',
);
foreach ($optional as $name) {
$exists = db_result(db_query("SELECT name FROM {system} WHERE type='module' and name='%s'", $name));
drupal_install_modules(array(
$name,
));
if ($exists == $name) {
switch ($name) {
case 'admin_menu':
variable_set('admin_menu_margin_top', 1);
variable_set('admin_menu_position_fixed', 1);
variable_set('admin_menu_tweak_menu', 0);
variable_set('admin_menu_tweak_modules', 0);
variable_set('admin_menu_tweak_tabs', 0);
$menu_mid = hostmaster_create_menu(t('Administration'));
$admin_mid = hostmaster_menu_get_mid('admin');
hostmaster_update_menu_item($admin_mid, array(
'pid' => $menu_mid,
));
hostmaster_disable_menu_item($admin_mid);
break;
}
}
}
}