Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-26 11:02:28 +0300
committerPhil Hughes <me@iamphill.com>2016-04-26 11:04:35 +0300
commit97c1a1ef64cdce75afa24075ea77333e76c9ccbf (patch)
tree54e960093847aee8af2d865b461941b0c8b482e7 /app/controllers/search_controller.rb
parent7ee5de19804842033c3cfdc2bf1209c27adcd7b7 (diff)
Updated based on feedback
Changed some variable names Fixed CHANGELOG entry
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r--app/controllers/search_controller.rb5
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