Made CMS_MODULE.name deferred, and implemented by constant so that it can be use as static call.

Copied site resources on related module source folder.
Renamed "login" module as "auth" module, and updated related locations and files.
This commit is contained in:
2015-06-29 16:24:17 +02:00
parent 48b0ad5195
commit ebc5924c01
56 changed files with 789 additions and 249 deletions

View File

@@ -21,7 +21,7 @@ feature {NONE} -- Initialization
s: detachable READABLE_STRING_32
l_contact_email, l_subject_register, l_subject_activate, l_subject_password, l_subject_oauth: detachable READABLE_STRING_8
do
setup := a_cms_api.setup
cms_api := a_cms_api
-- Use global smtp setting if any, otherwise "localhost"
smtp_server := utf.escaped_utf_32_string_to_utf_8_string_8 (a_cms_api.setup.text_item_or_default ("smtp", "localhost"))
l_site_name := utf.escaped_utf_32_string_to_utf_8_string_8 (a_cms_api.setup.site_name)
@@ -31,7 +31,7 @@ feature {NONE} -- Initialization
admin_email := l_site_name + " <" + admin_email +">"
end
if attached {CONFIG_READER} a_cms_api.module_configuration_by_name ("login", Void) as cfg then
if attached {CONFIG_READER} a_cms_api.module_configuration_by_name ({CMS_AUTHENTICATION_MODULE}.name, Void) as cfg then
if attached cfg.text_item ("smtp") as l_smtp then
-- Overwrite global smtp setting if any.
smtp_server := utf.utf_32_string_to_utf_8_string_8 (l_smtp)
@@ -133,7 +133,7 @@ feature {NONE} -- Implementation: Template
template_path (a_name: READABLE_STRING_GENERAL): PATH
-- Location of template named `a_name'.
do
Result := setup.environment.config_path.extended ("modules").extended ("login").extended (a_name)
Result := cms_api.module_location_by_name ({CMS_AUTHENTICATION_MODULE}.name).extended (a_name)
end
template_string (a_name: READABLE_STRING_GENERAL; a_default: STRING): STRING
@@ -151,7 +151,7 @@ feature {NONE} -- Implementation: Template
feature {NONE} -- Implementation
setup: CMS_SETUP
cms_api: CMS_API
read_template_file (a_path: PATH): detachable STRING
-- Read the content of the file at path `a_path'.