Fixed recent_changes module to allow alias of recent_changes blocks.

Factorized code in CMS_RESPONSE by reusing add_block.
This commit is contained in:
2015-11-02 18:54:30 +01:00
parent 6aaec0be9f
commit 360855a558
2 changed files with 2 additions and 6 deletions

View File

@@ -94,7 +94,7 @@ feature -- Hook
recent_changes_feed (a_response, nb, Void).accept (gen) recent_changes_feed (a_response, nb, Void).accept (gen)
create b.make (a_block_id, Void, l_content, Void) 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
end end

View File

@@ -653,13 +653,9 @@ feature -- Blocks
-- and check optional associated condition. -- and check optional associated condition.
-- If no condition then use `is_block_included_by_default' to -- If no condition then use `is_block_included_by_default' to
-- decide if block is included or not. -- decide if block is included or not.
local
l_region: detachable like block_region
do do
if is_block_included (b.name, is_block_included_by_default) then if is_block_included (b.name, is_block_included_by_default) then
l_region := block_region (b, a_default_region) add_block (b, a_default_region)
l_region.extend (b)
blocks.force (b, b.name)
end end
end end