You are here

function elfinder_admin_submit in elFinder file manager 6

Same name and namespace in other branches
  1. 6.2 inc/elfinder.admin.inc \elfinder_admin_submit()
  2. 6.2 inc/elfinder.admin.profiles.inc \elfinder_admin_submit()
  3. 7.3 inc/elfinder.admin.inc \elfinder_admin_submit()
  4. 7.3 inc/elfinder.admin.profiles.inc \elfinder_admin_submit()
  5. 7 inc/elfinder.admin.inc \elfinder_admin_submit()
  6. 7.2 inc/elfinder.admin.inc \elfinder_admin_submit()
  7. 7.2 inc/elfinder.admin.profiles.inc \elfinder_admin_submit()

Save form data

1 string reference to 'elfinder_admin_submit'
elfinder_admin_form in inc/elfinder.admin.inc
Settings form definition

File

inc/elfinder.admin.inc, line 188
file manager admin settings page

Code

function elfinder_admin_submit($form, &$form_state) {
  variable_set('elfinder_settings_thumbnail_size', $form_state['values']['tmbsize']);
  variable_set('elfinder_settings_thumbnail_dirname', $form_state['values']['tmbdirname']);
  if ($form_state['values']['filesystem_root'] == 'custom') {
    if ($form_state['values']['filesystem_root_custom'] != '') {
      variable_set('elfinder_settings_filesystem_root_custom', $form_state['values']['filesystem_root_custom']);
      variable_set('elfinder_settings_filesystem_root', $form_state['values']['filesystem_root']);
    }
    variable_set('elfinder_settings_filesystem_url_custom', $form_state['values']['filesystem_url_custom']);
  }
  else {
    variable_set('elfinder_settings_filesystem_root', $form_state['values']['filesystem_root']);
  }
  variable_set('elfinder_settings_filesystem_mimedetect', $form_state['values']['mime_detect']);
  variable_set('elfinder_settings_filesystem_fileurl', $form_state['values']['file_url_type']);
  variable_set('elfinder_settings_thumbnail_imglib', $form_state['values']['imglib']);
  variable_set('elfinder_settings_filesystem_fileperm', $form_state['values']['file_perm']);
  variable_set('elfinder_settings_filesystem_dirperm', $form_state['values']['dir_perm']);
  variable_set('elfinder_settings_misc_rememberlastdir', $form_state['values']['rememberlastdir']);
  variable_set('elfinder_settings_misc_usesystemjquery', $form_state['values']['usesystemjquery']);
  drupal_set_message(t('Changes have been saved.'));
}