summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-01-25 17:04:03 +0000
committerDries Buytaert <dries@buytaert.net>2010-01-25 17:04:03 +0000
commit2e8d384cba4f18a8880c9620041c00334b95a1a5 (patch)
tree5a379cf3b701d02f8220b9e4b45ae695f70d17f4 /modules/taxonomy/taxonomy.module
parent981bd12676645aa129c51583a6078e432dc10f2e (diff)
downloadbrdo-2e8d384cba4f18a8880c9620041c00334b95a1a5.tar.gz
brdo-2e8d384cba4f18a8880c9620041c00334b95a1a5.tar.bz2
- Rollback of patch #693362.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module18
1 files changed, 18 insertions, 0 deletions
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
@@ -573,6 +573,24 @@ function taxonomy_terms_static_reset() {
}
/**
+ * 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.
*
* @param $type