diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-30 02:01:41 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-30 02:01:41 +0000 |
commit | 02c1eeee3fc904ecc7845902cc11ba545dd9466b (patch) | |
tree | eb0af2759c9e1d3ad8a83fef225df3e8ed28ba9c /modules/taxonomy | |
parent | b1d0d1340c2f63ed5e1c8ec8df8b9e70edfe49ce (diff) | |
download | brdo-02c1eeee3fc904ecc7845902cc11ba545dd9466b.tar.gz brdo-02c1eeee3fc904ecc7845902cc11ba545dd9466b.tar.bz2 |
#684202 by catch: Added Entity insert/delete/update hooks, to support caching.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
1 files changed, 4 insertions, 0 deletions
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') |