You are here

function data_node_active_form_submit in Data 6

Submit handler for form.

1 string reference to 'data_node_active_form_submit'
data_node_active_form in data_node/data_node.module
Form callback for setting the active node.

File

data_node/data_node.module, line 181
Hooks and API functions for Data Node module.

Code

function data_node_active_form_submit($form, &$form_state) {
  data_node_set_active($form['#table']
    ->get('name'), $form_state['values']['nid']);

  // Redirect ourselves because '#redirect' does not support queries.
  $query = array();
  foreach ($_GET as $k => $v) {
    if ($k != 'q') {
      $query[] = "{$k}={$v}";
    }
  }
  drupal_goto($_GET['q'], implode('&', $query));
}