Commit 1139628a authored by Markus Koller's avatar Markus Koller

Merge branch 'fj-prevent-loading-content-wiki-find-page-ocurrencce' into 'master'

Prevent loading wiki page content when not necessary

See merge request gitlab-org/gitlab!83842
parents 0a6ec0fe bff66b13
......@@ -222,7 +222,7 @@ class WikiPage
update_attributes(attrs)
if title.present? && title_changed? && wiki.find_page(title).present?
if title.present? && title_changed? && wiki.find_page(title, load_content: false).present?
attributes[:title] = page.title
raise PageRenameError, s_('WikiEdit|There is already a page with the same title in that path.')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment