function ggroup_update_7001 in Group 7
Drop the ggroup_enabled_subgroups variable.
File
- modules/
ggroup/ ggroup.install, line 68 - Install, update and uninstall functions for the Subgroup project.
Code
function ggroup_update_7001() {
// Reshape the old configuration to fit the new style.
foreach (variable_get('ggroup_enabled_subgroups') as $type => $enabled) {
if (!empty($enabled)) {
// By setting data, we flag the subgroup type as enabled.
$old_config[$type] = array();
}
}
// The content of ggroup_enabled_subgroups has moved to the group types.
foreach (group_types() as $group_type) {
$group_type->config['subgroup'] = $old_config;
$group_type
->save();
}
variable_del('ggroup_enabled_subgroups');
}