Project

General

Profile

Defect #24869 » 0002-Modify-circular-inclusion-test-to-use-page.id-instea.patch

Michael Esemplare, 2017-01-18 21:48

View differences:

lib/redmine/wiki_formatting/macros.rb
207 207
        page = Wiki.find_page(args.first.to_s, :project => @project)
208 208
        raise 'Page not found' if page.nil? || !User.current.allowed_to?(:view_wiki_pages, page.wiki.project)
209 209
        @included_wiki_pages ||= []
210
        raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.title)
211
        @included_wiki_pages << page.title
210
        raise 'Circular inclusion detected' if @included_wiki_pages.include?(page.id)
211
        @included_wiki_pages << page.id
212 212
        out = textilizable(page.content, :text, :attachments => page.attachments, :headings => false)
213 213
        @included_wiki_pages.pop
214 214
        out
(1-1/2)