From 1d357551227a8e58eff504220de509ec82357095 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Fri, 12 Mar 2010 21:33:39 +0100 Subject: Bugfix for queries with multiple negative tags --- trunk/etherpad/src/etherpad/control/tag/tag_control.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/etherpad/src/etherpad/control/tag/tag_control.js b/trunk/etherpad/src/etherpad/control/tag/tag_control.js index 56dd50b..bf9e9b2 100644 --- a/trunk/etherpad/src/etherpad/control/tag/tag_control.js +++ b/trunk/etherpad/src/etherpad/control/tag/tag_control.js @@ -76,7 +76,7 @@ function getQueryToSql(tags, antiTags, querySql) { ' join TAG AS t%(n)s on ' + ' t%(n)s.NAME = ? ' + ' and t%(n)s.ID = pt%(n)s.TAG_ID) on ' + - ' pt%(n)s.PAD_ID = p.ID', + ' pt%(n)s.PAD_ID = p.ID ', info)); whereArray.push(stringFormat('pt%(n)s.TAG_ID is null', info)); exceptParamArray.push(tag); @@ -96,9 +96,9 @@ function getQueryToSql(tags, antiTags, querySql) { info.n += 1; } - info["joins"] = joinArray.join(""); - info["excepts"] = exceptArray.join(""); - info["wheres"] = whereArray.length > 0 ? ' where ' + whereArray.join(' ') : ''; + info["joins"] = joinArray.join(' '); + info["excepts"] = exceptArray.join(' '); + info["wheres"] = whereArray.length > 0 ? ' where ' + whereArray.join(' and ') : ''; return { sql: stringFormat( -- cgit v1.2.3