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

6.x
Steven Wittens 2007-04-11 09:17:53 +00:00
parent 6a3b234606
commit 2a10f18211
1 changed files with 5 additions and 5 deletions

View File

@ -1546,14 +1546,14 @@ function taxonomy_implode_tags($tags, $vid = NULL) {
$typed_tags = array();
foreach ($tags as $tag) {
// 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.
if (strpos($term->name, ',') !== FALSE || strpos($term->name, '"') !== FALSE) {
$term->name = '"'. str_replace('"', '""', $term->name) .'"';
// Commas and quotes in tag names are special cases, so encode 'em.
if (strpos($tag->name, ',') !== FALSE || strpos($tag->name, '"') !== FALSE) {
$tag->name = '"'. str_replace('"', '""', $tag->name) .'"';
}
$typed_tags[] = $term->name;
$typed_tags[] = $tag->name;
}
}
return implode(', ', $typed_tags);