From 7c5d117dda9f9f735b16236cc5e5b2c787869330 Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Sat, 11 Sep 2010 02:33:27 +0000 Subject: [PATCH] #870278 budda: Fix SQL query in taxonomy_get_term_by_name_vid(). --- CHANGELOG.txt | 1 + mappers/taxonomy.inc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a9d5c641..960cf92d 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 6cc2f80e..10307678 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; -- GitLab