Commit fcc5c27b authored by Dries's avatar Dries
Browse files

- Patch #107822 by riccardoR: Content filtering ignores vocabularies with only one term.

parent cd8690fb
...@@ -662,7 +662,7 @@ function taxonomy_form_all($free_tags = 0) { ...@@ -662,7 +662,7 @@ 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);
if ($tree && (count($tree) > 1)) { if ($tree && (count($tree) > 0)) {
$options[$vocabulary->name] = array(); $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