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
55 lines
1.3 KiB
Plaintext
55 lines
1.3 KiB
Plaintext
note
|
|
description: "Summary description for {ABSTRACT_DB_TEST}."
|
|
date: "$Date: 2015-01-27 19:15:02 +0100 (mar., 27 janv. 2015) $"
|
|
revision: "$Revision: 96542 $"
|
|
|
|
class
|
|
ABSTRACT_DB_TEST
|
|
|
|
|
|
feature -- Database connection
|
|
|
|
connection: DATABASE_CONNECTION_ODBC
|
|
-- odbc database connection
|
|
once
|
|
create Result.login_with_connection_string ("Driver=SQLite3 ODBC Driver;Database=cms_lite.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;")
|
|
-- create Result.make_basic ("cms_lite.db")
|
|
end
|
|
|
|
feature {NONE} -- Implementation
|
|
|
|
storage: CMS_STORAGE
|
|
-- node provider.
|
|
once
|
|
create {CMS_STORAGE_SQLITE} Result.make (connection)
|
|
end
|
|
|
|
feature {NONE} -- Fixture Factory: Users
|
|
|
|
default_user: CMS_USER
|
|
do
|
|
Result := custom_user ("test", "password", "test@test.com")
|
|
end
|
|
|
|
custom_user (a_name, a_password, a_email: READABLE_STRING_32): CMS_USER
|
|
do
|
|
create Result.make (a_name)
|
|
Result.set_password (a_password)
|
|
Result.set_email (a_email)
|
|
end
|
|
|
|
feature {NONE} -- Fixture Factories: Nodes
|
|
|
|
default_node: CMS_NODE
|
|
do
|
|
Result := custom_node ("Default content", "default summary", "Default")
|
|
end
|
|
|
|
custom_node (a_content, a_summary, a_title: READABLE_STRING_32): CMS_NODE
|
|
do
|
|
create Result.make (a_content, a_summary, a_title)
|
|
end
|
|
|
|
|
|
end
|