Moved initialization from CMS_DEFAULT_SETUP to CMS_SETUP.initialize.

Rely on setup  "admin.installation_access" to determine who has access to /admin/install .
This commit is contained in:
2015-07-13 18:42:16 +02:00
parent 3dec559d58
commit 1b0cc9dc07
5 changed files with 116 additions and 89 deletions

View File

@@ -10,6 +10,9 @@ class
inherit
CMS_SETUP
redefine
initialize
end
REFACTORING_HELPER
@@ -29,7 +32,7 @@ feature {NONE} -- Initialization
initialize
-- Initialize various cms components.
do
configure
Precursor
create modules.make (3)
create storage_drivers.make (2)
@@ -38,63 +41,6 @@ feature {NONE} -- Initialization
initialize_modules
end
configure
local
l_url: like site_url
do
site_location := environment.path
--| Site id, used to identified a site, this could be set to a uuid, or else
site_id := text_item_or_default ("site.id", "_EWF_CMS_NO_ID_")
-- Site url: optional, but ending with a slash
l_url := string_8_item ("site_url")
if l_url /= Void and then not l_url.is_empty then
if l_url [l_url.count] /= '/' then
l_url := l_url + "/"
end
end
site_url := l_url
-- Site name
site_name := text_item_or_default ("site.name", "EWF::CMS")
-- Site email for any internal notification
-- Can be also used to precise the "From:" value for email.
site_email := text_item_or_default ("site.email", "webmaster")
-- Location for public files
if attached text_item ("files-dir") as s then
create files_location.make_from_string (s)
else
files_location := site_location.extended ("files")
end
-- Location for modules folders.
if attached text_item ("modules-dir") as s then
create modules_location.make_from_string (s)
else
modules_location := environment.modules_path
end
-- Location for themes folders.
if attached text_item ("themes-dir") as s then
create themes_location.make_from_string (s)
else
themes_location := environment.themes_path
end
-- Selected theme's name
theme_name := text_item_or_default ("theme", "default")
debug ("refactor_fixme")
fixme ("Review export clause for configuration and environment")
end
compute_theme_location
end
initialize_storages
-- Initialize storages
do
@@ -205,12 +151,6 @@ feature -- Element change
modules.extend (m)
end
feature -- Theme: Compute location
compute_theme_location
do
theme_location := themes_location.extended (theme_name)
end
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"