Fixed various CMS_MODULE.install, by not marked module installed if an error occurred!
Improved Auth related module implementation by having a way to change settings like token, max age. - use CMS_SETUP.site_id and related "auth.$module.token" ... configuration values. - removed related CMS_..._CONSTANTS classes. For auth session module, use auth_session as table name, and use VARCHAR(64). Extracted sql from blog module, and store it under site/scripts/install.sql . Renamed a few $modulename.sql as install.sql
This commit is contained in:
@@ -15,7 +15,6 @@ inherit
|
||||
module_api as contact_api
|
||||
redefine
|
||||
setup_hooks,
|
||||
is_installed,
|
||||
install,
|
||||
initialize,
|
||||
contact_api
|
||||
@@ -53,7 +52,6 @@ feature {NONE} -- Initialization
|
||||
package := "messaging"
|
||||
end
|
||||
|
||||
|
||||
feature -- Access
|
||||
|
||||
name: STRING = "contact"
|
||||
@@ -86,14 +84,6 @@ feature {CMS_API} -- Module Initialization
|
||||
|
||||
feature {CMS_API} -- Module management
|
||||
|
||||
is_installed (api: CMS_API): BOOLEAN
|
||||
-- Is Current module installed?
|
||||
local
|
||||
ut: FILE_UTILITIES
|
||||
do
|
||||
Result := ut.directory_path_exists (file_system_storage_path (api))
|
||||
end
|
||||
|
||||
install (api: CMS_API)
|
||||
local
|
||||
retried: BOOLEAN
|
||||
@@ -102,6 +92,7 @@ feature {CMS_API} -- Module management
|
||||
if not retried then
|
||||
create d.make_with_path (file_system_storage_path (api))
|
||||
d.recursive_create_dir
|
||||
Precursor {CMS_MODULE}(api) -- Marked installed
|
||||
end
|
||||
rescue
|
||||
retried := True
|
||||
|
||||
Reference in New Issue
Block a user