BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6b7e80cb
Unverified
Commit
6b7e80cb
authored
Sep 09, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent 500 error when search wiki for non-existing repo
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
638331d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
CHANGELOG
CHANGELOG
+1
-0
project_search_results.rb
lib/gitlab/project_search_results.rb
+9
-4
No files found.
CHANGELOG
View file @
6b7e80cb
...
@@ -24,6 +24,7 @@ v 7.3.0
...
@@ -24,6 +24,7 @@ v 7.3.0
- Comment & Close button
- Comment & Close button
- Process git push --all much faster
- Process git push --all much faster
- Don't allow edit of system notes
- Don't allow edit of system notes
- Project wiki search (Ralf Seidler)
v 7.2.1
v 7.2.1
- Delete orphaned labels during label migration (James Brooks)
- Delete orphaned labels during label migration (James Brooks)
...
...
lib/gitlab/project_search_results.rb
View file @
6b7e80cb
...
@@ -49,11 +49,16 @@ module Gitlab
...
@@ -49,11 +49,16 @@ module Gitlab
end
end
def
wiki_blobs
def
wiki_blobs
if
!
project
.
wiki_enabled?
if
project
.
wiki_enabled?
[]
wiki_repo
=
Repository
.
new
(
ProjectWiki
.
new
(
project
).
path_with_namespace
)
if
wiki_repo
.
exists?
wiki_repo
.
search_files
(
query
)
else
[]
end
else
else
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