You are here

function taxonomy_edge_enable in Taxonomy Edge 6

Same name and namespace in other branches
  1. 7.2 taxonomy_edge.install \taxonomy_edge_enable()

Implements hook_enable().

File

./taxonomy_edge.install, line 237
Installation file for Taxonomy Edge

Code

function taxonomy_edge_enable() {
  if (function_exists('drush_verify_cli') && drush_verify_cli()) {
    db_query("DELETE FROM {term_edge}");
    db_query("DELETE FROM {term_edge_order}");
    module_load_include('rebuild.inc', 'taxonomy_edge');
    $vids = array_keys(taxonomy_get_vocabularies());
    taxonomy_edge_rebuild_all_batch($vids);
    $batch =& batch_get();
    $batch['progressive'] = FALSE;
    batch_process();
  }
  else {
    $_SESSION['taxonomy_edge_rebuild_module_enabled'] = TRUE;
  }
}