]> source.dussan.org Git - redmine.git/commitdiff
Modify circular inclusion test to use page.id instead of page.title (#24869).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jan 2017 18:32:06 +0000 (18:32 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 19 Jan 2017 18:32:06 +0000 (18:32 +0000)
Patch by Michael Esemplare.

git-svn-id: http://svn.redmine.org/redmine/trunk@16227 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/wiki_formatting/macros.rb

index f8748373b4d7db6c66bfe62904e21ccbf7c286c5..1ec6035f7d3ecb1890746a0bd077c375166780ad 100644 (file)
@@ -207,8 +207,8 @@ module Redmine
         page = Wiki.find_page(args.first.to_s, :project => @project)
         raise 'Page not found' if page.nil? || !User.current.allowed_to?(:view_wiki_pages, page.wiki.project)
         @included_wiki_pages ||= []
-        raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.title)
-        @included_wiki_pages << page.title
+        raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.id)
+        @included_wiki_pages << page.id
         out = textilizable(page.content, :text, :attachments => page.attachments, :headings => false)
         @included_wiki_pages.pop
         out