From 360855a558ba97732ff30d06b17c2281ff97cb7d Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Mon, 2 Nov 2015 18:54:30 +0100 Subject: [PATCH] Fixed recent_changes module to allow alias of recent_changes blocks. Factorized code in CMS_RESPONSE by reusing add_block. --- modules/recent_changes/cms_recent_changes_module.e | 2 +- src/service/response/cms_response.e | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/recent_changes/cms_recent_changes_module.e b/modules/recent_changes/cms_recent_changes_module.e index f5c6a41..d2f1dfe 100644 --- a/modules/recent_changes/cms_recent_changes_module.e +++ b/modules/recent_changes/cms_recent_changes_module.e @@ -94,7 +94,7 @@ feature -- Hook recent_changes_feed (a_response, nb, Void).accept (gen) create b.make (a_block_id, Void, l_content, Void) - a_response.put_block (b, Void, False) + a_response.add_block (b, Void) end end diff --git a/src/service/response/cms_response.e b/src/service/response/cms_response.e index b06b689..d8cf39e 100644 --- a/src/service/response/cms_response.e +++ b/src/service/response/cms_response.e @@ -653,13 +653,9 @@ feature -- Blocks -- and check optional associated condition. -- If no condition then use `is_block_included_by_default' to -- decide if block is included or not. - local - l_region: detachable like block_region do if is_block_included (b.name, is_block_included_by_default) then - l_region := block_region (b, a_default_region) - l_region.extend (b) - blocks.force (b, b.name) + add_block (b, a_default_region) end end