From b814c91e91e41fe1577f0a6005354b9fc8fba0ff Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 12 May 2017 15:59:31 +0200 Subject: [PATCH] Updated obsolete message with expected timestamp. Removed a few obsolete calls or implicit conversions. --- src/configuration/cms_default_setup.e | 2 +- src/configuration/cms_setup.e | 5 +++-- src/hooks/cms_hook_block_helper.e | 6 +++--- src/kernel/content/cms_file_block.e | 6 ++++-- src/kernel/content/cms_smarty_template_block.e | 6 ++++-- src/kernel/link/cms_menu_system.e | 5 ++++- src/service/cms_api.e | 6 +++--- src/service/response/cms_response.e | 8 ++++---- src/theme/smarty_theme/smarty_cms_theme.e | 4 ++-- 9 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/configuration/cms_default_setup.e b/src/configuration/cms_default_setup.e index 2f8c8fa..3c502ac 100644 --- a/src/configuration/cms_default_setup.e +++ b/src/configuration/cms_default_setup.e @@ -104,7 +104,7 @@ feature -- Access do if not retried then if attached text_item ("mailer.smtp") as l_smtp then - create {NOTIFICATION_SMTP_MAILER} l_mailer.make (l_smtp) + create {NOTIFICATION_SMTP_MAILER} l_mailer.make (l_smtp.as_string_8_conversion) elseif attached text_item ("mailer.sendmail") as l_sendmail then create {NOTIFICATION_SENDMAIL_MAILER} l_mailer.make_with_location (l_sendmail) end diff --git a/src/configuration/cms_setup.e b/src/configuration/cms_setup.e index e2220fb..48c78ee 100644 --- a/src/configuration/cms_setup.e +++ b/src/configuration/cms_setup.e @@ -17,6 +17,7 @@ feature {NONE} -- Initialization local l_url: like site_url s, l_email: detachable READABLE_STRING_8 + utf: UTF_CONVERTER do site_location := environment.path @@ -49,7 +50,7 @@ feature {NONE} -- Initialization l_email := string_8_item_or_default ("mailer.from", "webmaster") end if l_email.has ('<') then - l_email := site_name + " <" + l_email + ">" + l_email := utf.string_32_to_utf_8_string_8 (site_name) + " <" + l_email + ">" end site_email := l_email @@ -125,7 +126,7 @@ feature -- Access layout: CMS_ENVIRONMENT -- CMS environment. - obsolete "use `environment' [april-2015]" + obsolete "use `environment' [2017-05-31]" do Result := environment end diff --git a/src/hooks/cms_hook_block_helper.e b/src/hooks/cms_hook_block_helper.e index 842fe93..ae70aaf 100644 --- a/src/hooks/cms_hook_block_helper.e +++ b/src/hooks/cms_hook_block_helper.e @@ -45,7 +45,7 @@ feature {NONE} -- Factory: obsolete template_block (a_module: CMS_MODULE; a_block_id: READABLE_STRING_8; a_response: CMS_RESPONSE): detachable CMS_SMARTY_TEMPLATE_BLOCK -- Smarty content block for `a_block_id' in the context of `a_module' and `a_response'. obsolete - "Use smarty_template_block [Feb/2016]" + "Use smarty_template_block [2017-05-31]" do Result := smarty_template_block (a_module, a_block_id, a_response.api) end @@ -54,12 +54,12 @@ feature {NONE} -- Factory: obsolete -- Smarty content block for `a_block_id' in the context of `a_module' and `a_response', -- With additional `a_values'. obsolete - "Use smarty_template_block_with_values [Feb/2016]" + "Use smarty_template_block_with_values [2017-05-31]" do Result := smarty_template_block_with_values (a_module, a_block_id, a_response.api, a_values) end note - copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" end diff --git a/src/kernel/content/cms_file_block.e b/src/kernel/content/cms_file_block.e index 6e2ff34..0dda91a 100644 --- a/src/kernel/content/cms_file_block.e +++ b/src/kernel/content/cms_file_block.e @@ -143,13 +143,15 @@ feature -- Conversion feature -- Debug out: STRING + local + utf: UTF_CONVERTER do create Result.make_from_string (generator) Result.append ("%Nname:") Result.append (name) if attached title as l_title then Result.append ("%N%Ttitle:") - Result.append (l_title) + Result.append (utf.string_32_to_utf_8_string_8 (l_title)) end Result.append ("%Nlocation:") Result.append (location.out) @@ -160,6 +162,6 @@ feature -- Debug Result.append ("%N") end note - copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" end diff --git a/src/kernel/content/cms_smarty_template_block.e b/src/kernel/content/cms_smarty_template_block.e index 83271ca..f578053 100644 --- a/src/kernel/content/cms_smarty_template_block.e +++ b/src/kernel/content/cms_smarty_template_block.e @@ -161,13 +161,15 @@ feature -- Conversion feature -- Debug out: STRING + local + utf: UTF_CONVERTER do create Result.make_from_string (generator) Result.append ("%Nname:") Result.append (name) if attached title as l_title then Result.append ("%N%Ttitle:") - Result.append (l_title) + Result.append (utf.string_32_to_utf_8_string_8 (l_title)) end Result.append ("%Nlocation:") Result.append (location.out) @@ -190,6 +192,6 @@ feature -- Debug Result.append ("%N}") end note - copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" end diff --git a/src/kernel/link/cms_menu_system.e b/src/kernel/link/cms_menu_system.e index 73e519e..8d639f5 100644 --- a/src/kernel/link/cms_menu_system.e +++ b/src/kernel/link/cms_menu_system.e @@ -46,7 +46,7 @@ feature -- Access main_menu: CMS_MENU obsolete - "Use `primary_menu' [Nov/2014]" + "Use `primary_menu' [2017-05-31]" do Result := primary_menu end @@ -101,4 +101,7 @@ feature {NONE} -- Implementation items: STRING_TABLE [CMS_MENU] +;note + copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" + license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" end diff --git a/src/service/cms_api.e b/src/service/cms_api.e index 57c0946..78fcc64 100644 --- a/src/service/cms_api.e +++ b/src/service/cms_api.e @@ -280,7 +280,7 @@ feature {CMS_API_ACCESS} -- CMS Formats management if not s.is_empty then s.append ("+") end - s.append (f_ic.item.name) + s.append_string_general (f_ic.item.name) end ji.put_string (s, "filters") @@ -293,7 +293,7 @@ feature {CMS_API_ACCESS} -- CMS Formats management if not s.is_empty then s.append ("+") end - s.append (ct.name) + s.append_string_general (ct.name) end end ji.put_string (s, "types") @@ -1172,7 +1172,7 @@ feature -- Theming path helpers do Result := setup.theme_location_for (a_theme_name) end - + theme_path_for (a_theme_name: READABLE_STRING_GENERAL): STRING_8 -- URL path to the theme `a_theme_name`. do diff --git a/src/service/response/cms_response.e b/src/service/response/cms_response.e index 49e7159..1c7a3cc 100644 --- a/src/service/response/cms_response.e +++ b/src/service/response/cms_response.e @@ -399,7 +399,7 @@ feature -- Menu main_menu: CMS_MENU obsolete - "Use `primary_menu' [Nov/2014]" + "Use `primary_menu' [2017-05-31]" do Result := primary_menu end @@ -460,7 +460,7 @@ feature -- Blocks initialization block_region_preference (a_block_id: READABLE_STRING_8; a_default_region: READABLE_STRING_8): READABLE_STRING_8 -- Region associated with `a_block_id' in configuration, if any. do - Result := setup.text_item_or_default ("blocks." + a_block_id + ".region", a_default_region) + Result := setup.text_item_or_default ("blocks." + a_block_id + ".region", a_default_region).as_string_8_conversion end feature -- Block management @@ -909,7 +909,7 @@ feature -- Hooks hooks: CMS_HOOK_CORE_MANAGER -- Manager handling hook subscriptions. obsolete - "Use api.hooks [dec/2015]" + "Use api.hooks [2017-05-31]" do Result := api.hooks end @@ -918,7 +918,7 @@ feature -- Menu: change add_to_main_menu (lnk: CMS_LINK) obsolete - "use add_to_primary_menu [Nov/2014]" + "use add_to_primary_menu [2017-05-31]" do add_to_primary_menu (lnk) end diff --git a/src/theme/smarty_theme/smarty_cms_theme.e b/src/theme/smarty_theme/smarty_cms_theme.e index 3e44846..e16732c 100644 --- a/src/theme/smarty_theme/smarty_cms_theme.e +++ b/src/theme/smarty_theme/smarty_cms_theme.e @@ -94,11 +94,11 @@ feature -- Conversion l_table_inspector: detachable STRING_TABLE_OF_STRING_INSPECTOR do prepare (page) - create l_page_inspector.register (page.generating_type) + create l_page_inspector.register (page.generating_type.name) if attached {CMS_RESPONSE} page.variables.item ("cms") as l_cms then if attached l_cms.regions as l_regions then - create l_regions_inspector.register (l_regions.generating_type) + create l_regions_inspector.register (l_regions.generating_type.name) end end