function disclaimer_admin_settings_submit in Disclaimer 7
Same name and namespace in other branches
- 6.2 disclaimer.admin.inc \disclaimer_admin_settings_submit()
- 6 disclaimer.admin.inc \disclaimer_admin_settings_submit()
Validation function for the general configuration form.
1 string reference to 'disclaimer_admin_settings_submit'
- disclaimer_admin_settings in ./
disclaimer.admin.inc - Admin settings form for Disclaimer.
File
- ./
disclaimer.admin.inc, line 398 - Admin page callbacks for the Disclaimer module.
Code
function disclaimer_admin_settings_submit($form, &$form_state) {
// Set file image permanent
if ($form_state['values']['disclaimer_action_type'] == 'image') {
$file = file_load($form_state['values']['disclaimer_enter_img']);
$file->status = FILE_STATUS_PERMANENT;
file_save($file);
file_usage_add($file, 'disclaimer', 'enter_img', 1);
$file = file_load($form_state['values']['disclaimer_exit_img']);
$file->status = FILE_STATUS_PERMANENT;
file_save($file);
file_usage_add($file, 'disclaimer', 'exit_img', 1);
}
}