Added is_https: BOOLEAN query to CMS (on page, but also as 'is_https' value)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
note
|
note
|
||||||
description: "Generic CMS Response.It builds the content to get process to render the output"
|
description: "Generic CMS Response.It builds the content to get process to render the output"
|
||||||
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
|
date: "$Date: 2015-02-16 20:14:19 +0100 (lun., 16 févr. 2015) $"
|
||||||
revision: "$Revision: 96616 $"
|
revision: "$Revision: 96643 $"
|
||||||
|
|
||||||
deferred class
|
deferred class
|
||||||
CMS_RESPONSE
|
CMS_RESPONSE
|
||||||
@@ -844,11 +844,13 @@ feature -- Generation
|
|||||||
-- Variables
|
-- Variables
|
||||||
page.register_variable (request.absolute_script_url (""), "site_url")
|
page.register_variable (request.absolute_script_url (""), "site_url")
|
||||||
page.register_variable (request.absolute_script_url (""), "host") -- Same as `site_url'.
|
page.register_variable (request.absolute_script_url (""), "host") -- Same as `site_url'.
|
||||||
|
page.register_variable (request.is_https, "is_https")
|
||||||
if attached current_user_name (request) as l_user then
|
if attached current_user_name (request) as l_user then
|
||||||
page.register_variable (l_user, "user")
|
page.register_variable (l_user, "user")
|
||||||
end
|
end
|
||||||
page.register_variable (title, "site_title")
|
page.register_variable (title, "site_title")
|
||||||
page.set_is_front (is_front)
|
page.set_is_front (is_front)
|
||||||
|
page.set_is_https (request.is_https)
|
||||||
|
|
||||||
-- Variables/Misc
|
-- Variables/Misc
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {CMS_HTML_PAGE}."
|
description: "Summary description for {CMS_HTML_PAGE}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date: 2014-11-13 19:34:00 +0100 (jeu., 13 nov. 2014) $"
|
date: "$Date: 2015-02-16 20:14:19 +0100 (lun., 16 févr. 2015) $"
|
||||||
revision: "$Revision: 96086 $"
|
revision: "$Revision: 96643 $"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_HTML_PAGE
|
CMS_HTML_PAGE
|
||||||
@@ -40,6 +40,8 @@ feature -- Access
|
|||||||
|
|
||||||
is_front: BOOLEAN
|
is_front: BOOLEAN
|
||||||
|
|
||||||
|
is_https: BOOLEAN
|
||||||
|
|
||||||
title: detachable READABLE_STRING_32
|
title: detachable READABLE_STRING_32
|
||||||
|
|
||||||
language: STRING
|
language: STRING
|
||||||
@@ -96,6 +98,12 @@ feature -- Element change
|
|||||||
is_front := b
|
is_front := b
|
||||||
end
|
end
|
||||||
|
|
||||||
|
set_is_https (b: BOOLEAN)
|
||||||
|
-- Set `is_https' to `b'.
|
||||||
|
do
|
||||||
|
is_https := b
|
||||||
|
end
|
||||||
|
|
||||||
register_variable (a_value: detachable ANY; k: READABLE_STRING_GENERAL)
|
register_variable (a_value: detachable ANY; k: READABLE_STRING_GENERAL)
|
||||||
do
|
do
|
||||||
variables.force (a_value, k)
|
variables.force (a_value, k)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
note
|
note
|
||||||
description: "Summary description for {SMARTY_CMS_HTML_PAGE_INSPECTOR}."
|
description: "Summary description for {SMARTY_CMS_HTML_PAGE_INSPECTOR}."
|
||||||
author: ""
|
author: ""
|
||||||
date: "$Date: 2014-11-13 16:23:47 +0100 (jeu., 13 nov. 2014) $"
|
date: "$Date: 2015-02-16 20:14:19 +0100 (lun., 16 févr. 2015) $"
|
||||||
revision: "$Revision: 96085 $"
|
revision: "$Revision: 96643 $"
|
||||||
|
|
||||||
class
|
class
|
||||||
SMARTY_CMS_HTML_PAGE_INSPECTOR
|
SMARTY_CMS_HTML_PAGE_INSPECTOR
|
||||||
@@ -38,6 +38,8 @@ feature {TEMPLATE_ROUTINES}
|
|||||||
end
|
end
|
||||||
elseif l_fn.is_case_insensitive_equal ("is_front") then
|
elseif l_fn.is_case_insensitive_equal ("is_front") then
|
||||||
Result := cell_of (l_page.is_front)
|
Result := cell_of (l_page.is_front)
|
||||||
|
elseif l_fn.is_case_insensitive_equal ("is_https") then
|
||||||
|
Result := cell_of (l_page.is_https)
|
||||||
elseif l_fn.starts_with_general ("region_") then
|
elseif l_fn.starts_with_general ("region_") then
|
||||||
l_fn.remove_head (7) -- remove "region_"
|
l_fn.remove_head (7) -- remove "region_"
|
||||||
Result := cell_of (l_page.region (l_fn))
|
Result := cell_of (l_page.region (l_fn))
|
||||||
|
|||||||
Reference in New Issue
Block a user