diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-26 09:02:28 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-26 09:04:35 +0100 |
commit | 97c1a1ef64cdce75afa24075ea77333e76c9ccbf (patch) | |
tree | 54e960093847aee8af2d865b461941b0c8b482e7 /app/controllers | |
parent | 7ee5de19804842033c3cfdc2bf1209c27adcd7b7 (diff) | |
download | gitlab-ce-97c1a1ef64cdce75afa24075ea77333e76c9ccbf.tar.gz |
Updated based on feedbacksearch-ui-update
Changed some variable names
Fixed CHANGELOG entry
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/search_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 8263bb5b0ac..69c92d2bed2 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -6,6 +6,8 @@ class SearchController < ApplicationController layout 'search' def show + return if params[:search].nil? || params[:search].blank? + if params[:project_id].present? @project = Project.find_by(id: params[:project_id]) @project = nil unless can?(current_user, :download_code, @project) @@ -16,7 +18,6 @@ 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] @@ -43,7 +44,7 @@ class SearchController < ApplicationController Search::GlobalService.new(current_user, params).execute end - @objects = @search_results.objects(@scope, params[:page]) + @search_objects = @search_results.objects(@scope, params[:page]) end def autocomplete |