Fixed a subtle incompatibility with older storages. Madeleine must die

This commit is contained in:
Alexey Verkhovsky 2005-07-30 06:39:34 +00:00
parent 659f4a4cc5
commit 207737aa22
3 changed files with 2 additions and 6 deletions

View file

@ -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

View file

@ -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 "<em>Recursive include detected; #{@page_name} --> #{@content.page_name} " +
"--> #{@page_name}</em>\n"
else

View file

@ -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 <mark @ threewordslong . com>
# CREATED: 15th May 2004
# UPDATED: 22nd May 2004
module ChunkManager
attr_reader :chunks_by_type, :chunks_by_id, :chunks, :chunk_id