You are here

function _spaces_og_group_node_form_submit in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces_og.module \_spaces_og_group_node_form_submit()
  2. 6.2 spaces_og/spaces_og.module \_spaces_og_group_node_form_submit()

Custom submit handler for group node forms

1 string reference to '_spaces_og_group_node_form_submit'
_spaces_og_form_alter_group in spaces_og/spaces_og.module
Group node form_alter(). @TODO: repair default values on node previews.

File

spaces_og/spaces_og.module, line 676

Code

function _spaces_og_group_node_form_submit($form, &$form_state) {

  // Prefix might have changed -- do the redirect correctly
  if (isset($form_state['values']['nid'])) {
    $nid = $form_state['values']['nid'];
    $space = spaces_load('og', $nid);
    if ($space) {

      // Disable PURL for the current redirect
      purl_disable(TRUE);
      $form_state['redirect'] = "node/{$nid}";
    }
  }
}