Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-07-06 22:21:08 +0300
committerDouwe Maan <douwe@selenight.nl>2017-07-07 00:19:10 +0300
commitd195db17e9ff62c3dbfb8ba03dacadf965b1fb8b (patch)
tree58157f1909c4f04306d10be5b842f99a79f9b809 /app/models/project_wiki.rb
parentbb918a2fd98136c232baa34104c357f3716f8842 (diff)
Don't show auxiliary blob viewer for README when there is no wiki
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r--app/models/project_wiki.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index beaadbbd1ab..dfca0031af8 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -63,6 +63,10 @@ class ProjectWiki
!!repository.exists?
end
+ def has_home_page?
+ !!find_page('home')
+ end
+
# Returns an Array of Gitlab WikiPage instances or an
# empty Array if this Wiki has no pages.
def pages