You are here

function fieldgroup_remove_group_submit in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group_submit()
  2. 6 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group_submit()
  3. 6.2 modules/fieldgroup/fieldgroup.module \fieldgroup_remove_group_submit()

File

./fieldgroup.module, line 217
Create field groups for CCK fields.

Code

function fieldgroup_remove_group_submit($form_id, &$form_values, $content_type, $group_name) {
  db_query("DELETE FROM {node_group} WHERE  type_name = '%s' AND group_name = '%s'", $content_type['type'], $group_name);
  db_query("DELETE FROM {node_group_fields} WHERE  type_name = '%s' AND group_name = '%s'", $content_type['type'], $group_name);
  cache_clear_all('fieldgroup_data', 'cache_content');
  drupal_set_message(t('The group %group_name has been removed.', array(
    '%group_name' => $group_name,
  )));
  return 'admin/content/types/' . $content_type['url_str'] . '/fields';
}