diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9d5c641a006d8e0b7bb0bbe653c1b29b4d6243d..960cf92d751a4181a8f4c1c424d677a0ecc0484b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ Feeds 6.x xxxxxxxxxxxxxxxxxxxxxx -------------------------------- +- #870278 budda: Fix SQL query in taxonomy_get_term_by_name_vid(). - #795114 budda, alex_b: Taxonomy term processor doesn't require vocabulary to be set. diff --git a/mappers/taxonomy.inc b/mappers/taxonomy.inc index 6cc2f80ef0ec27615cb561ac497d8d9e860b7d69..10307678644800e890a6385ec18786cb853e4915 100644 --- a/mappers/taxonomy.inc +++ b/mappers/taxonomy.inc @@ -131,7 +131,7 @@ function taxonomy_feeds_set_target(&$node, $key, $terms) { * An array of matching term objects. */ function taxonomy_get_term_by_name_vid($name, $vid) { - $db_result = db_query(db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE LOWER(t.name) = LOWER('%s') AND vid=%d", 't', 'tid'), trim($name), $vid); + $db_result = db_query(db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE LOWER(t.name) = LOWER('%s') AND t.vid = %d", 't', 'tid'), trim($name), $vid); $result = array(); while ($term = db_fetch_object($db_result)) { $result[] = $term;