From 02c1eeee3fc904ecc7845902cc11ba545dd9466b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 30 Jan 2010 02:01:41 +0000 Subject: #684202 by catch: Added Entity insert/delete/update hooks, to support caching. --- modules/taxonomy/taxonomy.module | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 8e70c5a84..a5dda375b 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -338,12 +338,14 @@ function taxonomy_vocabulary_save($vocabulary) { if (!empty($vocabulary->vid) && !empty($vocabulary->name)) { $status = drupal_write_record('taxonomy_vocabulary', $vocabulary, 'vid'); module_invoke_all('taxonomy_vocabulary_update', $vocabulary); + entity_invoke('update', 'taxonomy_vocabulary', $vocabulary); } elseif (empty($vocabulary->vid)) { $status = drupal_write_record('taxonomy_vocabulary', $vocabulary); field_attach_create_bundle('taxonomy_term', $vocabulary->machine_name); taxonomy_vocabulary_create_field($vocabulary); module_invoke_all('taxonomy_vocabulary_insert', $vocabulary); + entity_invoke('insert', 'taxonomy_vocabulary', $vocabulary); } cache_clear_all(); @@ -470,11 +472,13 @@ function taxonomy_term_save($term) { $status = drupal_write_record('taxonomy_term_data', $term, 'tid'); field_attach_update('taxonomy_term', $term); module_invoke_all('taxonomy_term_update', $term); + entity_invoke('update', 'taxonomy_term', $term); } else { $status = drupal_write_record('taxonomy_term_data', $term); field_attach_insert('taxonomy_term', $term); module_invoke_all('taxonomy_term_insert', $term); + entity_invoke('insert', 'taxonomy_term', $term); } db_delete('taxonomy_term_hierarchy') -- cgit v1.2.3