Skip to content
Snippets Groups Projects
Commit fcc5c27b authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent cd8690fb
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment