diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-17 09:23:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-17 09:23:38 +0000 |
commit | a50eb34bda8adcb7fc32a7fd8943e4d4b1467939 (patch) | |
tree | de244fa893f06bb9176f7da8e25ce6179eb3d4b1 /modules | |
parent | 8b5175a9838e1f94d47f23c042ddb33f77e6a554 (diff) | |
download | brdo-a50eb34bda8adcb7fc32a7fd8943e4d4b1467939.tar.gz brdo-a50eb34bda8adcb7fc32a7fd8943e4d4b1467939.tar.bz2 |
- Patch #44381 by gerhard: improved consistency of API. Always pass an array.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 6 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index cd58909e6..c64f215a3 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -169,7 +169,7 @@ function taxonomy_save_vocabulary(&$edit) { } function taxonomy_del_vocabulary($vid) { - $vocabulary = taxonomy_get_vocabulary($vid); + $vocabulary = (array) taxonomy_get_vocabulary($vid); db_query('DELETE FROM {vocabulary} WHERE vid = %d', $vid); db_query('DELETE FROM {vocabulary_node_types} WHERE vid = %d', $vid); @@ -331,7 +331,7 @@ function taxonomy_del_term($tid) { } } - $term = taxonomy_get_term($tid); + $term = (array) taxonomy_get_term($tid); db_query('DELETE FROM {term_data} WHERE tid = %d', $tid); db_query('DELETE FROM {term_hierarchy} WHERE tid = %d', $tid); @@ -340,7 +340,7 @@ function taxonomy_del_term($tid) { db_query('DELETE FROM {term_node} WHERE tid = %d', $tid); module_invoke_all('taxonomy', 'delete', 'term', $term); - drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $term->name)))); + drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $term['name'])))); } $tids = $orphans; diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index cd58909e6..c64f215a3 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -169,7 +169,7 @@ function taxonomy_save_vocabulary(&$edit) { } function taxonomy_del_vocabulary($vid) { - $vocabulary = taxonomy_get_vocabulary($vid); + $vocabulary = (array) taxonomy_get_vocabulary($vid); db_query('DELETE FROM {vocabulary} WHERE vid = %d', $vid); db_query('DELETE FROM {vocabulary_node_types} WHERE vid = %d', $vid); @@ -331,7 +331,7 @@ function taxonomy_del_term($tid) { } } - $term = taxonomy_get_term($tid); + $term = (array) taxonomy_get_term($tid); db_query('DELETE FROM {term_data} WHERE tid = %d', $tid); db_query('DELETE FROM {term_hierarchy} WHERE tid = %d', $tid); @@ -340,7 +340,7 @@ function taxonomy_del_term($tid) { db_query('DELETE FROM {term_node} WHERE tid = %d', $tid); module_invoke_all('taxonomy', 'delete', 'term', $term); - drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $term->name)))); + drupal_set_message(t('Deleted term %name.', array('%name' => theme('placeholder', $term['name'])))); } $tids = $orphans; |