From 9f36bd59a975da3ede2394b35515815a77a8ac55 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Tue, 2 Aug 2005 03:23:05 +0000 Subject: [PATCH] Fxed handling of a page that tries to include itself --- app/models/chunks/include.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/chunks/include.rb b/app/models/chunks/include.rb index 370093cc..d4b668a2 100644 --- a/app/models/chunks/include.rb +++ b/app/models/chunks/include.rb @@ -24,7 +24,7 @@ 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) + if refpage.name == @content.page_name or refpage.wiki_includes.include?(@content.page_name) # this will break the recursion @content.delete_chunk(self) return "Recursive include detected; #{@page_name} --> #{@content.page_name} " +