function taxonomy_edge_cron in Taxonomy Edge 7.2
Same name and namespace in other branches
- 8 taxonomy_edge.module \taxonomy_edge_cron()
- 6 taxonomy_edge.module \taxonomy_edge_cron()
- 7 taxonomy_edge.module \taxonomy_edge_cron()
Implements hook_cron().
Rebuild sorted tree if invalid
File
- ./taxonomy_edge.module, line 136 
- Selecting all children of a given taxonomy term can be a pain. This module makes it easier to do this, by maintaining a complete list of edges for each term using the adjecency matrix graph theory.
Code
function taxonomy_edge_cron() {
  module_load_include('rebuild.inc', 'taxonomy_edge');
  foreach (taxonomy_get_vocabularies() as $vocabulary) {
    if (!taxonomy_edge_is_order_valid($vocabulary->vid)) {
      taxonomy_edge_rebuild_order_batch($vocabulary->vid);
      $batch =& batch_get();
      $batch['progressive'] = FALSE;
      batch_process('admin/content/taxonomy/edge');
    }
  }
}