Commit 4fb76f68 authored by drumm's avatar drumm

#67647 by fgm and nickl. Don't make a taxonomy option for vocabularies without terms.

parent 77354a34
...@@ -565,8 +565,8 @@ function taxonomy_form_all($free_tags = 0) { ...@@ -565,8 +565,8 @@ function taxonomy_form_all($free_tags = 0) {
foreach ($vocabularies as $vid => $vocabulary) { foreach ($vocabularies as $vid => $vocabulary) {
if ($vocabulary->tags && !$free_tags) { continue; } if ($vocabulary->tags && !$free_tags) { continue; }
$tree = taxonomy_get_tree($vid); $tree = taxonomy_get_tree($vid);
$options[$vocabulary->name] = array(); if ($tree && (count($tree) > 1)) {
if ($tree) { $options[$vocabulary->name] = array();
foreach ($tree as $term) { foreach ($tree as $term) {
$options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name; $options[$vocabulary->name][$term->tid] = str_repeat('-', $term->depth) . $term->name;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment