2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

UX: move search to its own route

previously search was bundled with discovery, something that makes stuff confusing internally
This commit is contained in:
Sam 2015-07-27 16:13:11 +10:00
parent 68a262ff08
commit 41ceff8430
13 changed files with 244 additions and 63 deletions

View file

@ -99,6 +99,7 @@ class Search
@guardian = @opts[:guardian] || Guardian.new
@search_context = @opts[:search_context]
@include_blurbs = @opts[:include_blurbs] || false
@blurb_length = @opts[:blurb_length]
@limit = Search.per_facet
term = process_advanced_search!(term)
@ -116,7 +117,7 @@ class Search
@limit = Search.per_filter
end
@results = GroupedSearchResults.new(@opts[:type_filter], term, @search_context, @include_blurbs)
@results = GroupedSearchResults.new(@opts[:type_filter], term, @search_context, @include_blurbs, @blurb_length)
end
def self.execute(term, opts=nil)