function module_builder_default_submit in Module Builder 6
Module builder default submit
2 calls to module_builder_default_submit()
- module_builder_build_new_submit in ./
module_builder.pages.inc - module_builder_edit_form_submit in ./
module_builder.components.inc - Submit callback for the edit form
1 string reference to 'module_builder_default_submit'
- module_builder_get_components in ./
module_builder.api.inc - Gets all components
File
- ./
module_builder.api.inc, line 101 - API functions for the module_builder module
Code
function module_builder_default_submit($form, &$form_state) {
$values = (object) $form_state['values'];
unset($values->form_id, $values->submit, $values->op, $values->form_build_id, $values->form_token);
$final = new stdClass();
$final->mid = $values->mid;
$final->type = $values->type;
unset($values->mid, $values->type);
$final->data = $values;
if ((bool) db_result(db_query("SELECT mid FROM {module_builder_data} WHERE mid = %d AND type = '%s'", $final->mid, $final->type))) {
drupal_write_record('module_builder_data', $final, array(
'mid',
'type',
));
}
else {
drupal_write_record('module_builder_data', $final);
}
$form_state['rebuild'] = TRUE;
}