Added weight into to the CMS_LINK and provide a `sort' feature for CMS_MENU and related.

Protected cms service from registering many time the same module type.
Moved library/persistence/implementation/* under library/persistence/.
Moved site/www/themes to site/themes
For SQLite storage driver, auto create sqlite db file using associated sql script (to be completed).
Added code in demo module to reuse storage for module purpose.
Always call sql_post_execution in sql_query and sql_change, and not anymore by the callers.
Removed is_web and is_html from {CMS_SETUP}, it was not used.
Reused SHARED_*_ENCODER in CMS_ENCODERS
Added CMS_API.logger rather than using directly the SHARED_LOGGER.log ...
Centralize the implementation of current_user in CMS_REQUEST_UTIL
Removed the inheritance on WSF_FILTER for node handlers, since it is useless and unused.
Added CMS_NODE_API and CMS_USER_API
Prefix html id for block generated html items with "block-", to avoid css name conflict on "main", "content" or similar.
Code cleaning
This commit is contained in:
2015-02-16 13:01:06 +01:00
parent a810b1176c
commit 8d59d25ace
165 changed files with 1430 additions and 2206 deletions

View File

@@ -1,7 +1,7 @@
note
description: "Generic CMS Response.It builds the content to get process to render the output"
date: "$Date: 2014-12-15 21:43:38 +0100 (lun., 15 déc. 2014) $"
revision: "$Revision: 96346 $"
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision: "$Revision: 96616 $"
deferred class
CMS_RESPONSE
@@ -357,7 +357,6 @@ feature -- Blocks regions
end
end
feature -- Blocks
add_block (b: CMS_BLOCK; a_default_region: detachable READABLE_STRING_8)
@@ -369,7 +368,6 @@ feature -- Blocks
l_region.extend (b)
end
get_blocks
do
debug ("refactor_fixme")
@@ -754,9 +752,13 @@ feature -- Element Change
feature -- Generation
prepare (page: CMS_HTML_PAGE)
local
lnk: CMS_LINK
do
-- Menu
add_to_primary_menu (create {CMS_LOCAL_LINK}.make ("Home", "/"))
create {CMS_LOCAL_LINK} lnk.make ("Home", "/")
lnk.set_weight (-10)
add_to_primary_menu (lnk)
invoke_menu_system_alter (menu_system)
prepare_menu_system (menu_system)
@@ -774,6 +776,11 @@ feature -- Generation
end
end
-- Sort items
across menu_system as ic loop
ic.item.sort
end
-- Values
common_prepare (page)
custom_prepare (page)
@@ -843,10 +850,6 @@ feature -- Generation
page.register_variable (title, "site_title")
page.set_is_front (is_front)
-- Variables/Setup
page.register_variable (setup.is_web, "web")
page.register_variable (setup.is_html, "html")
-- Variables/Misc
-- FIXME: logo .. could be a settings of theme, managed by admin front-end/database.