function content_admin_display_overview_form_submit in Content Construction Kit (CCK) 5
Same name and namespace in other branches
- 6 includes/content.admin.inc \content_admin_display_overview_form_submit()
File
- ./
content_admin.inc, line 395 - Administrative interface for content type creation.
Code
function content_admin_display_overview_form_submit($form_id, $form_values) {
$type = $form_values['type_name'];
if (isset($form_values['fields'])) {
foreach ($form_values['fields'] as $fieldname => $fieldvalues) {
$display_settings = array();
foreach ($fieldvalues as $key => $value) {
$display_settings[$key] = $value;
}
db_query("UPDATE {node_field_instance} SET display_settings = '%s' WHERE type_name = '%s' AND field_name = '%s'", serialize($display_settings), $type, $fieldname);
}
content_clear_type_cache();
}
drupal_set_message(t('Your settings have been saved.'));
}