You are here

function dynamic_banner_settings_submit in Dynamic Banner 7

Same name and namespace in other branches
  1. 6 includes/callbacks.inc \dynamic_banner_settings_submit()

when the settings form submits this function will save the settings for use

File

includes/callbacks.inc, line 824
Dynamic Banner Admin Pages and various other functions to make them work Most of the code in this file was derived from path module

Code

function dynamic_banner_settings_submit($form, &$form_state) {
  $display = $form_state['values']['display_setting'];
  variable_set('dynamic_banner_display_setting', $display);
  $errors = $form_state['values']['display_errors'];

  // todo fix this
  if ($errors == 0) {
    variable_set('dynamic_banner_display_errors', TRUE);
  }
  else {
    variable_set('dynamic_banner_display_errors', FALSE);
  }
  variable_set('dynamic_banner_file_save_path', $form_state['values']['image_save_path']);
  $form_state['redirect'] = 'admin/structure/banners';
}