diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-07 17:54:06 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-07 17:54:06 +0000 |
commit | 5d6d7571c7c49115609bbf0b5142ae9630cfafa0 (patch) | |
tree | 895c2b940cf878d92f402261f01ce1c77feae31a /app/controllers/general_controller.rb | |
parent | 0d6c60edf025ef86d8ca74f9e10fca7e08951a90 (diff) | |
parent | 6524c746c31a7e6243249bcbe88c1a58f2088208 (diff) |
Merge branch 'feature/1118-fix-ask-us-to-add-links' into rails-3-develop
Diffstat (limited to 'app/controllers/general_controller.rb')
-rw-r--r-- | app/controllers/general_controller.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 540f67ec9..beefef4e6 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -178,6 +178,7 @@ class GeneralController < ApplicationController @xapian_requests_hits = @xapian_requests.results.size @xapian_requests_total_hits = @xapian_requests.matches_estimated @total_hits += @xapian_requests.matches_estimated + @request_for_spelling = @xapian_requests end if @bodies @xapian_bodies = perform_search([PublicBody], @query, @sortby, nil, 5) @@ -186,6 +187,7 @@ class GeneralController < ApplicationController @xapian_bodies_hits = @xapian_bodies.results.size @xapian_bodies_total_hits = @xapian_bodies.matches_estimated @total_hits += @xapian_bodies.matches_estimated + @request_for_spelling = @xapian_bodies end if @users @xapian_users = perform_search([User], @query, @sortby, nil, 5) @@ -194,14 +196,13 @@ class GeneralController < ApplicationController @xapian_users_hits = @xapian_users.results.size @xapian_users_total_hits = @xapian_users.matches_estimated @total_hits += @xapian_users.matches_estimated + @request_for_spelling = @xapian_users end # Spelling and highight words are same for all three queries - if !@xapian_requests.nil? - @highlight_words = @xapian_requests.words_to_highlight - if !(@xapian_requests.spelling_correction =~ /[a-z]+:/) - @spelling_correction = @xapian_requests.spelling_correction - end + @highlight_words = @request_for_spelling.words_to_highlight + if !(@request_for_spelling.spelling_correction =~ /[a-z]+:/) + @spelling_correction = @request_for_spelling.spelling_correction end @track_thing = TrackThing.create_track_for_search_query(@query, @variety_postfix) |