diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 19:51:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-04 19:51:40 +0300 |
commit | aefe6486cf0d193067112b90145083d73b96bfef (patch) | |
tree | 02dbf7d022069b183f34b63e99eb359d7e001ddb /app/controllers | |
parent | 66ebf02c05dc69a65731d61baf28ef3335db2bbf (diff) |
Add latest changes from gitlab-org/security/gitlab@13-6-stable-ee
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/search_controller.rb | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 42795e418a4..7a485eebfe3 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -8,6 +8,8 @@ class Explore::ProjectsController < Explore::ApplicationController include SortingHelper include SortingPreference + MIN_SEARCH_LENGTH = 3 + before_action :set_non_archived_param before_action :set_sorting @@ -72,7 +74,7 @@ class Explore::ProjectsController < Explore::ApplicationController def load_projects load_project_counts - projects = ProjectsFinder.new(current_user: current_user, params: params).execute + projects = ProjectsFinder.new(current_user: current_user, params: params.merge(minimum_search_length: MIN_SEARCH_LENGTH)).execute projects = preload_associations(projects) projects = projects.page(params[:page]).without_count diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 4b21edc98d5..c92b3457640 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -144,7 +144,6 @@ class SearchController < ApplicationController payload[:metadata] ||= {} payload[:metadata]['meta.search.group_id'] = params[:group_id] payload[:metadata]['meta.search.project_id'] = params[:project_id] - payload[:metadata]['meta.search.search'] = params[:search] payload[:metadata]['meta.search.scope'] = params[:scope] payload[:metadata]['meta.search.filters.confidential'] = params[:confidential] payload[:metadata]['meta.search.filters.state'] = params[:state] |