From 2e8d384cba4f18a8880c9620041c00334b95a1a5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 25 Jan 2010 17:04:03 +0000 Subject: - Rollback of patch #693362. --- modules/taxonomy/taxonomy.module | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'modules') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 8e70c5a84..cad3049f8 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -572,6 +572,24 @@ function taxonomy_terms_static_reset() { entity_get_controller('taxonomy_term')->resetCache(); } +/** + * Generate a set of options for selecting a term from all vocabularies. + */ +function taxonomy_form_all() { + $vocabularies = taxonomy_get_vocabularies(); + $options = array(); + foreach ($vocabularies as $vid => $vocabulary) { + $tree = taxonomy_get_tree($vid); + if ($tree && (count($tree) > 0)) { + $options[$vocabulary->name] = array(); + foreach ($tree as $term) { + $options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name; + } + } + } + return $options; +} + /** * Return an array of all vocabulary objects. * -- cgit v1.2.3