You are here

function content_display_overview_form_submit in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 includes/content.admin.inc \content_display_overview_form_submit()

Submit handler for the display overview form.

File

includes/content.admin.inc, line 697
Administrative interface for content type creation.

Code

function content_display_overview_form_submit($form, &$form_state) {
  module_load_include('inc', 'content', 'includes/content.crud');
  $form_values = $form_state['values'];
  foreach ($form_values as $key => $values) {

    // Groups are handled in fieldgroup_display_overview_form_submit().
    if (in_array($key, $form['#fields'])) {
      $field = content_fields($key, $form['#type_name']);

      // We have some numeric keys here, so we can't use array_merge.
      $field['display_settings'] = $values + $field['display_settings'];
      content_field_instance_update($field, FALSE);
    }
  }

  // Clear caches and rebuild menu.
  content_clear_type_cache(TRUE);
  menu_rebuild();
  drupal_set_message(t('Your settings have been saved.'));
}