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

@@ -0,0 +1,60 @@
note
description : "Objects that ..."
author : "$Author: jfiat $"
date : "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision : "$Revision: 96616 $"
class
CMS_ENV_LOGGER
inherit
CMS_LOGGER
SHARED_LOGGER
rename
log as log_facility
end
create
make
feature {NONE} -- Initialization
make
-- Initialize `Current'.
do
end
feature -- Logging
put_information (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_information (log_message (a_message, a_data))
end
put_error (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_error (log_message (a_message, a_data))
end
put_warning (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_warning (log_message (a_message, a_data))
end
put_critical (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_critical (log_message (a_message, a_data))
end
put_alert (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_alert (log_message (a_message, a_data))
end
put_debug (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
log_facility.write_debug (log_message (a_message, a_data))
end
end

View File

@@ -0,0 +1,55 @@
note
description : "Objects that ..."
author : "$Author: jfiat $"
date : "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision : "$Revision: 96616 $"
deferred class
CMS_LOGGER
feature -- Logging
put_information (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
put_error (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
put_warning (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
put_critical (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
put_alert (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
put_debug (a_message: READABLE_STRING_8; a_data: detachable ANY)
deferred
end
feature {NONE} -- Logging
log_message (a_message: READABLE_STRING_8; a_data: detachable ANY): STRING
do
create Result.make (a_message.count)
if attached {CMS_MODULE} a_data as a_module then
Result.append_character ('[')
Result.append (a_module.name)
Result.append_character (']')
Result.append_character (' ')
elseif attached {TYPE [detachable ANY]} a_data as a_type then
Result.append_character ('{')
Result.append (a_type.out)
Result.append_character ('}')
Result.append_character (' ')
end
Result.append (a_message)
end
end

View File

@@ -0,0 +1,39 @@
note
description : "Objects that ..."
author : "$Author: jfiat $"
date : "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision : "$Revision: 96616 $"
class
CMS_NULL_LOGGER
inherit
CMS_LOGGER
feature -- Logging
put_information (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
put_error (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
put_warning (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
put_critical (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
put_alert (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
put_debug (a_message: READABLE_STRING_8; a_data: detachable ANY)
do
end
end