From 207737aa22dfe2220f7b2e10a9a7c926567914ce Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sat, 30 Jul 2005 06:39:34 +0000 Subject: [PATCH] Fixed a subtle incompatibility with older storages. Madeleine must die --- app/models/chunks/chunk.rb | 2 +- app/models/chunks/include.rb | 2 +- app/models/wiki_content.rb | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) 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