summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-09-06 07:22:41 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-09-06 07:22:41 +0000
commit4fb76f680fff27cfc54daee6e72a828485c68bf5 (patch)
tree97afae50a29b5a4a2de9e60906e3bd9e9a556fed
parent77354a34e50287e9e95cfdee69130b24acfe5597 (diff)
downloadbrdo-4fb76f680fff27cfc54daee6e72a828485c68bf5.tar.gz
brdo-4fb76f680fff27cfc54daee6e72a828485c68bf5.tar.bz2
#67647 by fgm and nickl. Don't make a taxonomy option for vocabularies without terms.
-rw-r--r--modules/taxonomy/taxonomy.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index bece3b163..2050416b3 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -565,8 +565,8 @@ function taxonomy_form_all($free_tags = 0) {
foreach ($vocabularies as $vid => $vocabulary) {
if ($vocabulary->tags && !$free_tags) { continue; }
$tree = taxonomy_get_tree($vid);
- $options[$vocabulary->name] = array();
- if ($tree) {
+ if ($tree && (count($tree) > 1)) {
+ $options[$vocabulary->name] = array();
foreach ($tree as $term) {
$options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
}