diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-02-02 00:55:59 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-02-02 00:55:59 +0000 |
commit | d56cf2b59c6c19e1dbaec6c679ce5ac48efd6635 (patch) | |
tree | 3083bdc2fbd1792e8a4bd54b3a708f89237ea51a /modules/taxonomy/taxonomy.module | |
parent | fbec279e4c6d2227a8453863e9149ea8ada96c10 (diff) | |
download | brdo-d56cf2b59c6c19e1dbaec6c679ce5ac48efd6635.tar.gz brdo-d56cf2b59c6c19e1dbaec6c679ce5ac48efd6635.tar.bz2 |
#10296: Clean up admin - content:
- Mass-delete functionality (with confirmation)
- Flexible filtering for the overview table based on status, type and taxonomy.
- Missing drupal_goto's
- Clean up watchdog messages
- Remove some dead code
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 75967f0f8..1bd57ec11 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -404,6 +404,25 @@ function taxonomy_form($vid, $value = 0, $help = NULL, $name = 'taxonomy') { } /** +* Generate a set of options for selecting a term from all vocabularies. Can be +* passed to form_select. +*/ +function taxonomy_form_all($value = 0, $help = NULL, $name = 'taxonomy') { + $vocabularies = taxonomy_get_vocabularies(); + $options = array(); + foreach ($vocabularies as $vid => $vocabulary) { + $tree = taxonomy_get_tree($vid); + $options[$vocabulary->name] = array(); + if ($tree) { + foreach ($tree as $term) { + $options[$vocabulary->name][$term->tid] = _taxonomy_depth($term->depth, '-') . $term->name; + } + } + } + return $options; +} + +/** * Return an array of all vocabulary objects. * * @param $type |