Skip to content

Commit

Permalink
Fixed a subtle incompatibility with older storages. Madeleine must die
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Verkhovsky committed Jul 30, 2005
1 parent 659f4a4 commit 207737a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/chunks/chunk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def mask

# 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
Expand Down
2 changes: 1 addition & 1 deletion app/models/chunks/include.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ def initialize(match_data, content)

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
Expand Down
4 changes: 0 additions & 4 deletions app/models/wiki_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
# * :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
Expand Down

0 comments on commit 207737a

Please sign in to comment.