You are here

function revisioning_admin_configure_form_submit in Revisioning 8

Same name and namespace in other branches
  1. 7 revisioning.admin.inc \revisioning_admin_configure_form_submit()

Execute the revisioning_admin_configure_form.

1 string reference to 'revisioning_admin_configure_form_submit'
revisioning_admin_configure in ./revisioning.admin.inc
Menu callback for admin configuration settings.

File

./revisioning.admin.inc, line 95
Admin configuration settings for Revisioning.

Code

function revisioning_admin_configure_form_submit($form, &$form_state) {

  // Exclude unnecessary form elements.
  form_state_values_clean($form_state);
  foreach ($form_state['values'] as $key => $new_value) {
    $old_value = variable_get($key);
    if ($old_value != $new_value) {
      variable_set($key, $new_value);
      if ($key == 'revisioning_in_views_show_unpublished_content_terms') {
        foreach (node_load_multiple(FALSE) as $node) {
          revisioning_update_taxonomy_index($node, $new_value);
        }
      }
    }
  }
  drupal_set_message(t('The revisioning configuration options have been saved.'));
}