Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
874ad681
Commit
874ad681
authored
Sep 07, 2016
by
Razzeee
Committed by
Rémy Coutable
Sep 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search should compare only the lowercase versions of the project names
parent
4bdcbc85
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
CHANGELOG
CHANGELOG
+1
-0
lib/api/projects.rb
lib/api/projects.rb
+1
-1
No files found.
CHANGELOG
View file @
874ad681
...
...
@@ -111,6 +111,7 @@ v 8.12.0 (unreleased)
- Use default clone protocol on "check out, review, and merge locally" help page URL
- API for Ci Lint !5953 (Katarzyna Kobierska Urszula Budziszewska)
- Allow bulk update merge requests from merge requests index page
- Project search API is now agnostic to casing
v 8.11.6 (unreleased)
...
...
lib/api/projects.rb
View file @
874ad681
...
...
@@ -430,7 +430,7 @@ module API
get
"/search/:query"
do
ids
=
current_user
.
authorized_projects
.
map
(
&
:id
)
visibility_levels
=
[
Gitlab
::
VisibilityLevel
::
INTERNAL
,
Gitlab
::
VisibilityLevel
::
PUBLIC
]
projects
=
Project
.
where
(
"(id in (?) OR visibility_level in (?)) AND (
name LIKE (?
))"
,
ids
,
visibility_levels
,
"%
#{
params
[
:query
]
}
%"
)
projects
=
Project
.
where
(
"(id in (?) OR visibility_level in (?)) AND (
LOWER(name) LIKE LOWER((?)
))"
,
ids
,
visibility_levels
,
"%
#{
params
[
:query
]
}
%"
)
sort
=
params
[
:sort
]
==
'desc'
?
'desc'
:
'asc'
projects
=
case
params
[
"order_by"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment