summaryrefslogtreecommitdiff
path: root/web/lib/ui
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-14 16:51:23 +0200
committerJochen Topf <jochen@topf.org>2014-05-14 16:51:23 +0200
commit5d679cbbc1b43f8a968885ce599fa62618d04184 (patch)
treecdff1151f83d692ed340c8d88882a682137aa1ba /web/lib/ui
parent7199a841ad30eef068a84b709784ef005967015a (diff)
downloadtaginfo-5d679cbbc1b43f8a968885ce599fa62618d04184.tar
taginfo-5d679cbbc1b43f8a968885ce599fa62618d04184.tar.gz
Fix calculation of relations of given type.
Diffstat (limited to 'web/lib/ui')
-rw-r--r--web/lib/ui/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/ui/relation.rb b/web/lib/ui/relation.rb
index a8cfa43..e3bffa7 100644
--- a/web/lib/ui/relation.rb
+++ b/web/lib/ui/relation.rb
@@ -14,7 +14,7 @@ class Taginfo < Sinatra::Base
section :relations
@wiki_count = @db.count('wiki.relation_pages').condition('rtype=?', @rtype).get_first_value().to_i
- @count_all_values = @db.select("SELECT count_relations FROM db.keys").condition('key = ?', @rtype).get_first_value().to_i
+ @count_all_values = @db.select("SELECT count FROM db.relation_types").condition('rtype = ?', @rtype).get_first_value().to_i
@desc = h(@db.select("SELECT description FROM wiki.relation_pages WHERE lang=? AND rtype=?", r18n.locale.code, @rtype).get_first_value())
@desc = h(@db.select("SELECT description FROM wiki.relation_pages WHERE lang='en' AND rtype=?", @rtype).get_first_value()) if @desc == ''