function og_menu_update_7302 in Organic Groups Menu (OG Menu) 7.3
Enable OG Menu Default Links module if needed (backwards compatibility).
File
- ./
og_menu.install, line 205 - Install, update and uninstall functions for the og_menu module.
Code
function og_menu_update_7302(&$sandbox) {
$bundles = og_get_all_group_bundle();
$enable = FALSE;
// Check if a setting exists.
if ($bundles) {
foreach ($bundles as $entity_type => $entity_bundles) {
foreach ($entity_bundles as $bundle => $bundle_label) {
$group_type = strtolower('_' . $bundle);
$temp = variable_get('og_menu_default_links_' . $entity_type . $group_type, FALSE);
if (!empty($temp)) {
$enable = TRUE;
}
}
}
}
if ($enable) {
module_enable(array(
'og_menu_default_links',
), TRUE);
}
}