diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/models/wiki_page.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 803b9781ac4..647b4e787c6 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -185,7 +185,7 @@ class WikiPage # :content - The raw markup content. # :format - Optional symbol representing the # content format. Can be any type - # listed in the Wiki::MARKUPS + # listed in the Wiki::VALID_USER_MARKUPS # Hash. # :message - Optional commit message to set on # the new page. @@ -205,7 +205,7 @@ class WikiPage # attrs - Hash of attributes to be updated on the page. # :content - The raw markup content to replace the existing. # :format - Optional symbol representing the content format. - # See Wiki::MARKUPS Hash for available formats. + # See Wiki::VALID_USER_MARKUPS Hash for available formats. # :message - Optional commit message to set on the new version. # :last_commit_sha - Optional last commit sha to validate the page unchanged. # :title - The Title (optionally including dir) to replace existing title @@ -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 |