diff options
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/api/v4/tag.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/lib/api/v4/tag.rb b/web/lib/api/v4/tag.rb index b15cf8d..3fe55a4 100644 --- a/web/lib/api/v4/tag.rb +++ b/web/lib/api/v4/tag.rb @@ -278,12 +278,14 @@ class Taginfo < Sinatra::Base value = params[:value] q = like_contains(params[:query]) total = @db.select('SELECT count(*) FROM projects.projects p, projects.project_tags t ON p.id=t.project_id'). + condition("status = 'OK'"). condition('key = ?', key). condition_if('value = ? OR VALUE IS NULL', value). condition_if("value LIKE ? ESCAPE '@' OR name LIKE ? ESCAPE '@'", q, q). get_first_value().to_i res = @db.select('SELECT t.project_id, p.name, p.icon_url AS project_icon_url, t.key, t.value, t.description, t.doc_url, t.icon_url, t.on_node, t.on_way, t.on_relation, t.on_area FROM projects.projects p, projects.project_tags t ON p.id=t.project_id'). + condition("status = 'OK'"). condition('key = ?', key). condition_if('value = ? OR VALUE IS NULL', value). condition_if("value LIKE ? ESCAPE '@' OR name LIKE ? ESCAPE '@'", q, q). |