From a50eb34bda8adcb7fc32a7fd8943e4d4b1467939 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 17 Jan 2006 09:23:38 +0000 Subject: [PATCH] - Patch #44381 by gerhard: improved consistency of API. Always pass an array. --- modules/taxonomy.module | 6 +++--- modules/taxonomy/taxonomy.module | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/taxonomy.module b/modules/taxonomy.module index cd58909e6c89..c64f215a3656 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 cd58909e6c89..c64f215a3656 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; -- GitLab