You are here

function recently_read_settings_submit in Recently Read 7

Same name and namespace in other branches
  1. 6 recently_read.module \recently_read_settings_submit()
  2. 7.2 recently_read.admin.inc \recently_read_settings_submit()

File

./recently_read.module, line 252
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function recently_read_settings_submit($form, &$form_state) {
  $selected = array();
  foreach ($form_state['values']['node_types'] as $value) {
    if ($value) {
      $selected[] = $value;
    }
  }
  variable_set('recently_read_node_types', $selected);
  variable_set('recently_read_max_entries', $form_state['values']['max_entries']);
  variable_set('recently_read_anonymous_enabled', $form_state['values']['anonymous_enabled']);
  drupal_set_message(t('The configuration options have been saved.'));
}