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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
17a9ecf8
Commit
17a9ecf8
authored
Mar 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove confusing code
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e07b2f52
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
app/services/search/global_service.rb
app/services/search/global_service.rb
+1
-3
No files found.
app/services/search/global_service.rb
View file @
17a9ecf8
...
@@ -16,9 +16,7 @@ module Search
...
@@ -16,9 +16,7 @@ module Search
projects
=
projects
.
where
(
namespace_id:
group
.
id
)
if
group
projects
=
projects
.
where
(
namespace_id:
group
.
id
)
if
group
project_ids
=
projects
.
pluck
(
:id
)
project_ids
=
projects
.
pluck
(
:id
)
projects
=
projects
.
search
(
query
)
result
[
:projects
]
=
projects
.
search
(
query
).
limit
(
20
)
result
[
:projects
]
=
projects
.
limit
(
20
)
result
[
:merge_requests
]
=
MergeRequest
.
in_projects
(
project_ids
).
search
(
query
).
order
(
'updated_at DESC'
).
limit
(
20
)
result
[
:merge_requests
]
=
MergeRequest
.
in_projects
(
project_ids
).
search
(
query
).
order
(
'updated_at DESC'
).
limit
(
20
)
result
[
:issues
]
=
Issue
.
where
(
project_id:
project_ids
).
search
(
query
).
order
(
'updated_at DESC'
).
limit
(
20
)
result
[
:issues
]
=
Issue
.
where
(
project_id:
project_ids
).
search
(
query
).
order
(
'updated_at DESC'
).
limit
(
20
)
result
[
:total_results
]
=
%w(projects issues merge_requests)
.
sum
{
|
items
|
result
[
items
.
to_sym
].
size
}
result
[
:total_results
]
=
%w(projects issues merge_requests)
.
sum
{
|
items
|
result
[
items
.
to_sym
].
size
}
...
...
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