diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/general_controller.rb | 9 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index cefc3c020..55abea3b7 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -125,7 +125,7 @@ class GeneralController < ApplicationController return end [:latest_status, :request_variety, :request_date_after, :request_date_before, :query, :tags].each do |x| - params[x] = session[x] + params[x] = session[x] if params[x].nil? end combined = params[:combined] @sortby = nil @@ -160,14 +160,17 @@ class GeneralController < ApplicationController @bodies = false @requests = false @users = true + else + @variety_postfix = "all" end - else - @variety_postfix = "all" end @query = combined.join("/") if params[:query].nil? params[:query] = @query end + if @variety_postfix != "all" && @requests + @query, _ = make_query_from_params + end @inputted_sortby = @sortby @common_query = get_tags_from_params if @sortby.nil? diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index ba060d33c..4c5ea974c 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -58,9 +58,9 @@ <% for variety, label in labels %> <% if @variety_postfix != variety %> <% if variety != "users" %> - <%= link_to label, search_url([params[:query], @common_query], variety, @sort_postfix), :method => :get %> + <%= link_to label, search_url([params[:query], @common_query], variety, @sort_postfix) %> <% else %> - <%= link_to label, search_url(params[:query], variety, @sort_postfix), :method => :get %> + <%= link_to label, search_url(params[:query], variety, @sort_postfix) %> <% end %> <% else %> <%= label %> |