summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2012-02-25 15:43:23 +0100
committerJochen Topf <jochen@topf.org>2012-02-25 15:43:23 +0100
commit88e1bb9f642048d6c8375751369cc62d34ac832d (patch)
treef39fcaa1e0fe86dfc1773ce2c38192e3c3c34352 /web/lib
parentae678011030890b556d4f50814d3d8cbb8656f77 (diff)
downloadtaginfo-88e1bb9f642048d6c8375751369cc62d34ac832d.tar
taginfo-88e1bb9f642048d6c8375751369cc62d34ac832d.tar.gz
Make XAPI/JOSM button use filter setting
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/ui/keys_tags.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/lib/ui/keys_tags.rb b/web/lib/ui/keys_tags.rb
index 1412b50..c49b3d5 100644
--- a/web/lib/ui/keys_tags.rb
+++ b/web/lib/ui/keys_tags.rb
@@ -19,6 +19,7 @@ class Taginfo < Sinatra::Base
@filter_type = get_filter()
@sel = Hash.new('')
@sel[@filter_type] = ' selected="selected"'
+ @filter_xapi = { 'all' => '*', nil => '*', 'nodes' => 'node', 'ways' => 'way', 'relations' => 'relation' }[@filter_type];
@count_all_values = @db.select("SELECT count_#{@filter_type} FROM db.keys").condition('key = ?', @key).get_first_value().to_i
@@ -99,6 +100,7 @@ class Taginfo < Sinatra::Base
@filter_type = get_filter()
@sel = Hash.new('')
@sel[@filter_type] = ' selected="selected"'
+ @filter_xapi = { 'all' => '*', nil => '*', 'nodes' => 'node', 'ways' => 'way', 'relations' => 'relation' }[@filter_type];
@wiki_count = @db.count('wiki.wikipages').condition('key=?', @key).condition('value=?', @value).get_first_value().to_i
if @wiki_count == 0