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
23241c18
Commit
23241c18
authored
Sep 06, 2014
by
Ralf Seidler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed houndci complaining over too long lines
parent
d93b046c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/controllers/search_controller.rb
app/controllers/search_controller.rb
+2
-1
lib/gitlab/project_search_results.rb
lib/gitlab/project_search_results.rb
+4
-2
No files found.
app/controllers/search_controller.rb
View file @
23241c18
...
@@ -9,7 +9,8 @@ class SearchController < ApplicationController
...
@@ -9,7 +9,8 @@ class SearchController < ApplicationController
@search_results
=
if
@project
@search_results
=
if
@project
return
access_denied!
unless
can?
(
current_user
,
:download_code
,
@project
)
return
access_denied!
unless
can?
(
current_user
,
:download_code
,
@project
)
unless
%w(blobs notes issues merge_requests wiki_blobs)
.
include?
(
@scope
)
unless
%w(blobs notes issues merge_requests wiki_blobs)
.
include?
(
@scope
)
@scope
=
'blobs'
@scope
=
'blobs'
end
end
...
...
lib/gitlab/project_search_results.rb
View file @
23241c18
...
@@ -22,7 +22,8 @@ module Gitlab
...
@@ -22,7 +22,8 @@ module Gitlab
end
end
def
total_count
def
total_count
@total_count
||=
issues_count
+
merge_requests_count
+
blobs_count
+
notes_count
+
wiki_blobs_count
@total_count
||=
issues_count
+
merge_requests_count
+
blobs_count
+
notes_count
+
wiki_blobs_count
end
end
def
blobs_count
def
blobs_count
...
@@ -51,7 +52,8 @@ module Gitlab
...
@@ -51,7 +52,8 @@ module Gitlab
if
!
project
.
wiki_enabled?
if
!
project
.
wiki_enabled?
[]
[]
else
else
Repository
.
new
(
ProjectWiki
.
new
(
project
).
path_with_namespace
).
search_files
(
query
)
Repository
.
new
(
ProjectWiki
.
new
(
project
).
path_with_namespace
).
search_files
(
query
)
end
end
end
end
...
...
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