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:
Diffstat (limited to 'app/helpers/wiki_helper.rb')
-rw-r--r--app/helpers/wiki_helper.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb
index ad33ac66f38..8c756b9370b 100644
--- a/app/helpers/wiki_helper.rb
+++ b/app/helpers/wiki_helper.rb
@@ -69,7 +69,12 @@ module WikiHelper
end
def wiki_attachment_upload_url
- expose_url(api_v4_projects_wikis_attachments_path(id: @wiki.container.id))
+ case @wiki.container
+ when Project
+ expose_url(api_v4_projects_wikis_attachments_path(id: @wiki.container.id))
+ else
+ raise TypeError, "Unsupported wiki container #{@wiki.container.class}"
+ end
end
def wiki_sort_controls(wiki, sort, direction)
@@ -147,3 +152,5 @@ module WikiHelper
!container.has_confluence?
end
end
+
+WikiHelper.prepend_if_ee('EE::WikiHelper')