function css_injector_edit_save in CSS Injector 6
Same name and namespace in other branches
- 7.2 css_injector.admin.inc \css_injector_edit_save()
- 7 css_injector.admin.inc \css_injector_edit_save()
Submit button callback for the CSS rule edit form.
1 call to css_injector_edit_save()
- css_injector_edit_save_and_continue in ./
css_injector.admin.inc - Save and continue callback for the CSS rule edit form.
1 string reference to 'css_injector_edit_save'
- css_injector_edit in ./
css_injector.admin.inc - Constructor for the CSS rule edit form.
File
- ./
css_injector.admin.inc, line 212
Code
function css_injector_edit_save($form, &$form_state) {
$rule = $form_state['rule'];
drupal_write_record('css_injector_rule', $rule, empty($rule['crid']) ? NULL : 'crid');
file_save_data($rule['css_text'], file_create_path(_css_injector_rule_path($rule['crid'])), FILE_EXISTS_REPLACE);
_css_injector_load_rule(NULL, TRUE);
drupal_set_message('Your CSS injection rule was saved.');
$form_state['redirect'] = 'admin/settings/css_injector';
}