forum_enable

function forum_enable

forum_enable()

Implements hook_enable().

File

modules/forum/forum.install, line 25
Install, update, and uninstall functions for the Forum module.

Code

function forum_enable() {
  // If we enable forum at the same time as taxonomy we need to call
  // field_associate_fields() as otherwise the field won't be enabled until
  // hook modules_enabled is called which takes place after hook_enable events.
  field_associate_fields('taxonomy');
  // Create the forum vocabulary if it does not exist.
  $vocabulary = taxonomy_vocabulary_load(variable_get('forum_nav_vocabulary', 0));
  if (!$vocabul