You are here

function imce_form_admin_form_submit in IMCE 5

Save settings. (Forms API -> formID_submit)

File

./imce.module, line 711

Code

function imce_form_admin_form_submit($form_id, $edit) {
  if (isset($edit['common']['tinymce'])) {
    variable_set('imce_settings_tinymce', $edit['common']['tinymce']);
  }
  if (isset($edit['common']['fck'])) {
    variable_set('imce_settings_fck', $edit['common']['fck']);
  }
  if (isset($edit['common']['textarea'])) {
    variable_set('imce_settings_textarea', $edit['common']['textarea']);
  }
  if (isset($edit['common']['disable_private'])) {
    variable_set('imce_settings_disable_private', $edit['common']['disable_private']);
  }
  if (isset($edit['common']['rank'])) {
    variable_set('imce_settings_rank', explode('>', str_replace(' ', '', $edit['common']['rank'])));
  }
  if (isset($edit['user1'])) {
    variable_set('imce_settings_user1', $edit['user1']);
  }
  if (isset($edit['roles'])) {
    variable_set('imce_settings_roles', $edit['roles']);
  }
  drupal_set_message(t('The changes have been saved.'));
}