|
@@ -55,7 +55,7 @@ def search(params)
|
55
|
55
|
end
|
56
|
56
|
|
57
|
57
|
def search_threads(q, username, from_date, to_date, sort, offset, exact_match)
|
58
|
|
- sort = Sequel.desc(params[:sort] == 'post' ? :last_post_created_at : :created_at)
|
|
58
|
+ sort = Sequel.desc(sort == 'post' ? :last_post_created_at : :created_at)
|
59
|
59
|
query = VLV::Thread
|
60
|
60
|
.select(Sequel.lit('threads.*, count(*) OVER() AS full_count'))
|
61
|
61
|
.where(Sequel.lit("(LOWER(threads.creator) = LOWER(?) OR ? = '')", username, username))
|