1 file.admin.inc file_type_revert_confirm_submit($form, &$form_state)

Process file type revert confirm submissions.

File

core/modules/file/file.admin.inc, line 436
File type editing user interface.

Code

function file_type_revert_confirm_submit($form, &$form_state) {
  $type = $form_state['values']['type'];

  config('file.type.' . $type)->delete();
  config_install_default_config('file', 'file.type.' . $type);

  $t_args = array('%name' => $form_state['values']['name']);
  backdrop_set_message(t('The file type %name has been reverted.', $t_args));
  watchdog('file', 'Reverted file type %name.', $t_args, WATCHDOG_NOTICE);

  file_type_cache_reset();

  $form_state['redirect'] = 'admin/structure/file-types';
  return;
}