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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user