You are here

function faq_ask_taxonomy_vocabulary_update in FAQ_Ask 7

Implementation of hook_taxonomy_vocabulary_update()

TODO: Find out if this is needed

Parameters

object $vocabulary: vocabulary to be modified

File

./faq_ask.module, line 1858
This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.

Code

function faq_ask_taxonomy_vocabulary_update($vocabulary) {

  //  dpm($vocabulary);
  //  dpm(field_info_instances('node', 'faq'));
  return;
  if (in_array('faq', $edit['nodes'])) {

    // If it's there now, we're done.
    return;
  }

  // Not there now, so we need to see if it was.
  if (in_array($vocabulary->vid, variable_get('faq_ask_vocabularies', array()))) {
    $tree = taxonomy_get_tree($vocabulary->vid);
    foreach ($tree as $term) {
      $my_tid = $term->tid;
      $my_tname = $term->name;
      _faq_ask_delete_expert($my_tid, $my_tname);
    }

    // End foreach tree.
    _faq_ask_delete_vocabulary($vocabulary);
  }
}