diff --git a/library/configuration/src/ini_config.e b/library/configuration/src/ini_config.e index 9e9ae06..37aa75b 100644 --- a/library/configuration/src/ini_config.e +++ b/library/configuration/src/ini_config.e @@ -44,8 +44,8 @@ note @include=file-to-include ]" - date: "$Date: 2014-12-18 16:37:11 +0100 (jeu., 18 déc. 2014) $" - revision: "$Revision: 96383 $" + date: "$Date: 2015-03-09 19:25:49 +0100 (lun., 09 mars 2015) $" + revision: "$Revision: 96797 $" class INI_CONFIG @@ -314,10 +314,13 @@ feature {NONE} -- Implementation f: PLAIN_TEXT_FILE l_last_section_name: like last_section_name retried: BOOLEAN + l_old_associated_path: like associated_path do + l_old_associated_path := associated_path if retried then has_error := True else + associated_path := p l_last_section_name := last_section_name last_section_name := Void create f.make_with_path (p) @@ -337,6 +340,7 @@ feature {NONE} -- Implementation end end last_section_name := l_last_section_name + associated_path := l_old_associated_path rescue retried := True retry @@ -351,6 +355,7 @@ feature {NONE} -- Implementation lst: LIST [STRING_8] tb: STRING_TABLE [STRING_8] i,j: INTEGER + p: PATH l_section_name: like last_section_name do obj := Void @@ -384,7 +389,11 @@ feature {NONE} -- Implementation if k.is_case_insensitive_equal_general ("@include") then - import_path (create {PATH}.make_from_string (v), last_section_name) + create p.make_from_string (v) + if not p.is_absolute and attached associated_path as l_path then + p := l_path.parent.extended_path (p) + end + import_path (p, last_section_name) else i := k.index_of ('[', 1) if i > 0 then diff --git a/src/configuration/cms_layout.e b/src/configuration/cms_layout.e index 9a126cd..5c0e23d 100644 --- a/src/configuration/cms_layout.e +++ b/src/configuration/cms_layout.e @@ -7,8 +7,8 @@ note - documentation - themes ]" - date: "$Date: 2015-02-05 10:25:53 +0100 (jeu., 05 févr. 2015) $" - revision: "$Revision: 96584 $" + date: "$Date: 2015-03-09 19:25:49 +0100 (lun., 09 mars 2015) $" + revision: "$Revision: 96797 $" class CMS_LAYOUT @@ -44,12 +44,19 @@ feature -- Access do p := internal_cms_config_ini_path if p = Void then - p := config_path.extended ("cms.ini") + p := config_path.extended (cms_config_ini_name) internal_cms_config_ini_path := p end Result := p end + cms_config_ini_name: STRING + -- CMS Configuration file name. + -- Redefine to easily change the name. + do + Result := "cms.ini" + end + feature {NONE} -- Implementation internal_theme_path: detachable like theme_path