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

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