summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-19 08:52:15 +0100
committerPhil Hughes <me@iamphill.com>2016-04-26 09:03:04 +0100
commit3137559dfd45ff0e7fa6653ed1ba3d75836e4c45 (patch)
treeba0995b8f27fa2449850b65d3ee445048cf75bb0 /app/controllers
parentf5bea9df5325fe136042fb32fe282cc04c2ec91a (diff)
downloadgitlab-ce-3137559dfd45ff0e7fa6653ed1ba3d75836e4c45.tar.gz
Fixed issue with dropdown option not sticking
CHANGELOG item
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/search_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index e42d2d73947..8263bb5b0ac 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -6,10 +6,6 @@ class SearchController < ApplicationController
layout 'search'
def show
- return if params[:search].nil? || params[:search].blank?
-
- @search_term = params[:search]
-
if params[:project_id].present?
@project = Project.find_by(id: params[:project_id])
@project = nil unless can?(current_user, :download_code, @project)
@@ -20,6 +16,9 @@ class SearchController < ApplicationController
@group = nil unless can?(current_user, :read_group, @group)
end
+ return if params[:search].nil? || params[:search].blank?
+ @search_term = params[:search]
+
@scope = params[:scope]
@show_snippets = params[:snippets].eql? 'true'