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,8 +1,8 @@
note
description: "Summary description for {CMS_USER_STORAGE_SQL}."
author: ""
date: "$Date: 2015-01-27 19:15:02 +0100 (mar., 27 janv. 2015) $"
revision: "$Revision: 96542 $"
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision: "$Revision: 96616 $"
deferred class
CMS_USER_STORAGE_SQL
@@ -34,7 +34,6 @@ feature -- Access: user
if sql_rows_count = 1 then
Result := sql_read_integer_32 (1)
end
sql_post_execution
end
users: LIST [CMS_USER]
@@ -46,7 +45,6 @@ feature -- Access: user
from
sql_query (select_users, Void)
sql_post_execution
sql_start
until
sql_after
@@ -56,7 +54,6 @@ feature -- Access: user
end
sql_forth
end
sql_post_execution
end
user_by_id (a_id: like {CMS_USER}.id): detachable CMS_USER
@@ -74,7 +71,6 @@ feature -- Access: user
else
check no_more_than_one: sql_rows_count = 0 end
end
sql_post_execution
end
user_by_name (a_name: like {CMS_USER}.name): detachable CMS_USER
@@ -92,7 +88,6 @@ feature -- Access: user
else
check no_more_than_one: sql_rows_count = 0 end
end
sql_post_execution
end
user_by_email (a_email: like {CMS_USER}.email): detachable CMS_USER
@@ -110,7 +105,6 @@ feature -- Access: user
else
check no_more_than_one: sql_rows_count = 0 end
end
sql_post_execution
end
is_valid_credential (l_auth_login, l_auth_password: READABLE_STRING_32): BOOLEAN
@@ -163,10 +157,8 @@ feature -- Change: user
l_parameters.put (create {DATE_TIME}.make_now_utc, "created")
sql_change (sql_insert_user, l_parameters)
sql_post_execution
if not error_handler.has_error then
a_user.set_id (last_inserted_user_id)
sql_post_execution
end
sql_commit_transaction
else
@@ -207,7 +199,6 @@ feature -- Change: user
l_parameters.put (create {DATE_TIME}.make_now_utc, "changed")
sql_change (sql_update_user, l_parameters)
sql_post_execution
else
-- set error
error_handler.add_custom_error (-1, "bad request" , "Missing password or email")
@@ -251,7 +242,6 @@ feature {NONE} -- Implementation
Result := l_salt
end
end
sql_post_execution
end
fetch_user: detachable CMS_USER
@@ -297,7 +287,6 @@ feature {NONE} -- Implementation
if sql_rows_count = 1 then
Result := sql_read_integer_64 (1)
end
sql_post_execution
end
feature {NONE} -- Sql Queries: USER