You are here

function merci_add_group_taxonomy in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2

Same name and namespace in other branches
  1. 7.2 merci.install \merci_add_group_taxonomy()
2 calls to merci_add_group_taxonomy()
merci_enable in ./merci.install
Implementation of hook_enable().
merci_update_5 in ./merci.install

File

./merci.install, line 921
merci Installer / Uninstaller

Code

function merci_add_group_taxonomy() {

  // borrowed from Forum module
  // Create the forum vocabulary if it does not exist. Assign the vocabulary
  // a low weight so it will appear first in forum topic create and edit
  // forms.
  // Delete the vocabulary.
  $vid = variable_get('merci_equipment_grouping_vid', '');
  if (!taxonomy_vocabulary_load($vid)) {
    $vocabulary = array(
      'name' => t('MERCI Equipment Grouping'),
      'multiple' => 0,
      'required' => 0,
      'hierarchy' => 0,
      'relations' => 0,
      'module' => 'merci',
      'weight' => -10,
    );
    taxonomy_save_vocabulary($vocabulary);
    variable_set('merci_equipment_grouping_vid', $vocabulary['vid']);
  }
}