Prevent loading wiki page content when not necessary

parent 0fce8e36
......@@ -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