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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-17 06:08:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-17 06:08:28 +0300
commit700068dda89eeb10272ae352a2a1e5144055f51b (patch)
treeb70d3d0f87a4814fa779a39cf078bd5bdb0623a0 /app/finders
parent6399bb0f03e60ee2220ae668bbc6682cbb346eee (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/projects_finder.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/finders/projects_finder.rb b/app/finders/projects_finder.rb
index 3c42a1f769f..1afd5adeada 100644
--- a/app/finders/projects_finder.rb
+++ b/app/finders/projects_finder.rb
@@ -89,6 +89,7 @@ class ProjectsFinder < UnionFinder
collection = by_not_aimed_for_deletion(collection)
collection = by_last_activity_after(collection)
collection = by_last_activity_before(collection)
+ collection = by_language(collection)
by_repository_storage(collection)
end
@@ -237,6 +238,14 @@ class ProjectsFinder < UnionFinder
end
end
+ def by_language(items)
+ if Feature.enabled?(:project_language_search, current_user) && params[:language].present?
+ items.with_programming_language_id(params[:language])
+ else
+ items
+ end
+ end
+
def sort(items)
if params[:sort].present?
items.sort_by_attribute(params[:sort])