diff --git a/app/models/chunks/chunk.rb b/app/models/chunks/chunk.rb index d6478a56..9ba3cc04 100644 --- a/app/models/chunks/chunk.rb +++ b/app/models/chunks/chunk.rb @@ -58,7 +58,7 @@ module Chunk # We should not use object_id because object_id is not guarantied # to be unique when we restart the wiki (new object ids can equal old ones - # that were restored form madeleine storage) + # that were restored from madeleine storage) def id @id ||= "#{@content.page_id}n#{@content.chunk_id}" end diff --git a/app/models/chunks/include.rb b/app/models/chunks/include.rb index 6ecaa1fb..370093cc 100644 --- a/app/models/chunks/include.rb +++ b/app/models/chunks/include.rb @@ -23,10 +23,10 @@ class Include < WikiChunk::WikiReference def get_unmask_text_avoiding_recursion_loops if refpage then + refpage.clear_display_cache if refpage.wiki_includes.include?(@content.page_name) # this will break the recursion @content.delete_chunk(self) - refpage.clear_display_cache return "Recursive include detected; #{@page_name} --> #{@content.page_name} " + "--> #{@page_name}\n" else diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb index e8e766da..89cd8c45 100644 --- a/app/models/wiki_content.rb +++ b/app/models/wiki_content.rb @@ -33,10 +33,6 @@ require 'chunks/nowiki' # * :mode # => How should the content be rendered? For normal display (show), # publishing (:publish) or export (:export)? -# -# AUTHOR: Mark Reid -# CREATED: 15th May 2004 -# UPDATED: 22nd May 2004 module ChunkManager attr_reader :chunks_by_type, :chunks_by_id, :chunks, :chunk_id