aboutsummaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-05-24 18:42:26 +0200
committerJochen Topf <jochen@topf.org>2014-05-24 18:42:26 +0200
commit42d8668174d1f6a11632af7a424017b0691c7fb5 (patch)
tree282658829a5b2ef09314003ccb9d59ce29e8371c /web/lib
parent05c12d0a3346c34164c5919f2a76e2d81ad4ea75 (diff)
downloadtaginfo-42d8668174d1f6a11632af7a424017b0691c7fb5.tar
taginfo-42d8668174d1f6a11632af7a424017b0691c7fb5.tar.gz
Query string can't be empty in this context.
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/api/v4/search.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/lib/api/v4/search.rb b/web/lib/api/v4/search.rb
index c159563..77bbc24 100644
--- a/web/lib/api/v4/search.rb
+++ b/web/lib/api/v4/search.rb
@@ -155,11 +155,11 @@ class Taginfo < Sinatra::Base
end
total = @db.count('search.ftsearch').
- condition_if("value MATCH ?", query).
+ condition("value MATCH ?", query).
get_first_value().to_i
res = @db.select('SELECT * FROM search.ftsearch').
- condition_if("value MATCH ?", query).
+ condition("value MATCH ?", query).
order_by(@ap.sortname, @ap.sortorder) { |o|
o.count_all
o.key