summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/wiki_actions.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 10:00:54 +0000
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /app/controllers/concerns/wiki_actions.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
downloadgitlab-ce-3cccd102ba543e02725d247893729e5c73b38295.tar.gz
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/controllers/concerns/wiki_actions.rb')
-rw-r--r--app/controllers/concerns/wiki_actions.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb
index 714a6f280f3..91de1d8aeae 100644
--- a/app/controllers/concerns/wiki_actions.rb
+++ b/app/controllers/concerns/wiki_actions.rb
@@ -21,10 +21,6 @@ module WikiActions
before_action :load_sidebar, except: [:pages]
before_action :set_content_class
- before_action do
- push_frontend_feature_flag(:wiki_switch_between_content_editor_raw_markdown, @group, default_enabled: :yaml)
- end
-
before_action only: [:show, :edit, :update] do
@valid_encoding = valid_encoding?
end
@@ -223,7 +219,7 @@ module WikiActions
def page
strong_memoize(:page) do
- wiki.find_page(*page_params)
+ wiki.find_page(*page_params, load_content: load_content?)
end
end
@@ -310,6 +306,12 @@ module WikiActions
def send_wiki_file_blob(wiki, file_blob)
send_blob(wiki.repository, file_blob)
end
+
+ def load_content?
+ return false if %w[history destroy diff show].include?(params[:action])
+
+ true
+ end
end
WikiActions.prepend_mod