You are here

function og_vocab_redirect_to_group_vocabularies in OG Vocabulary 7

After deleting the group vocabulary, redirect to the taxonomy group admin page.

1 string reference to 'og_vocab_redirect_to_group_vocabularies'
og_vocab_form_alter in ./og_vocab.module
Implements hook_form_alter().

File

./og_vocab.module, line 1240
Give each group its own system controlled vocabularies.

Code

function og_vocab_redirect_to_group_vocabularies($form, &$form_state) {
  if (!($context = og_vocab_is_group_admin_context())) {
    return;
  }
  $form_state['redirect'] = 'group/' . $context['group_type'] . '/' . $context['gid'] . '/admin/taxonomy';
  if ($form['#form_id'] == 'taxonomy_overview_terms' && !empty($form_state['confirm_reset_alphabetical']) && !empty($form_state['complete form']['machine_name']['#value'])) {

    // Redirect back to the terms overview, after "Reset alphabetical"
    // was submitted.
    $form_state['redirect'] .= '/' . $form_state['complete form']['machine_name']['#value'] . '/list';
  }
}