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
44e4fd0b
Commit
44e4fd0b
authored
Mar 26, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid loading default sidebar if there's a customized one
parent
92de278a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+5
-2
No files found.
app/controllers/projects/wikis_controller.rb
View file @
44e4fd0b
...
...
@@ -106,9 +106,12 @@ class Projects::WikisController < Projects::ApplicationController
# Call #wiki to make sure the Wiki Repo is initialized
@project_wiki
.
wiki
@sidebar_wiki_entries
=
WikiPage
.
group_by_directory
(
@project_wiki
.
pages
(
limit:
15
))
# Optional _sidebar.md page
@sidebar_page
=
@project_wiki
.
find_page
(
'_sidebar'
,
params
[
:version_id
])
unless
@sidebar_page
# Fallback to default sidebar
@sidebar_wiki_entries
=
WikiPage
.
group_by_directory
(
@project_wiki
.
pages
(
limit:
15
))
end
rescue
ProjectWiki
::
CouldNotCreateWikiError
flash
[
:notice
]
=
"Could not create Wiki Repository at this time. Please try again later."
redirect_to
project_path
(
@project
)
...
...
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