Skip to content
Snippets Groups Projects
Commit 2a10f182 authored by Steven Wittens's avatar Steven Wittens
Browse files

- Fix bad code in taxonomy.module (variable naming)

parent 6a3b2346
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
...@@ -1546,14 +1546,14 @@ function taxonomy_implode_tags($tags, $vid = NULL) { ...@@ -1546,14 +1546,14 @@ function taxonomy_implode_tags($tags, $vid = NULL) {
$typed_tags = array(); $typed_tags = array();
foreach ($tags as $tag) { foreach ($tags as $tag) {
// Extract terms belonging to the vocabulary in question. // Extract terms belonging to the vocabulary in question.
if (is_null($vid) || $term->vid == $vid) { if (is_null($vid) || $tag->vid == $vid) {
// Commas and quotes in terms are special cases, so encode 'em. // Commas and quotes in tag names are special cases, so encode 'em.
if (strpos($term->name, ',') !== FALSE || strpos($term->name, '"') !== FALSE) { if (strpos($tag->name, ',') !== FALSE || strpos($tag->name, '"') !== FALSE) {
$term->name = '"'. str_replace('"', '""', $term->name) .'"'; $tag->name = '"'. str_replace('"', '""', $tag->name) .'"';
} }
$typed_tags[] = $term->name; $typed_tags[] = $tag->name;
} }
} }
return implode(', ', $typed_tags); return implode(', ', $typed_tags);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment