Always set the content type when it is known for node view.
This commit is contained in:
@@ -135,7 +135,7 @@ feature {NONE} -- Implementation: routes
|
||||
r.add_warning_message ("Error with block [login]")
|
||||
end
|
||||
end
|
||||
r.set_value ("Basic Auth", "optional_content_type")
|
||||
r.set_optional_content_type ("Basic Auth")
|
||||
end
|
||||
r.execute
|
||||
end
|
||||
|
||||
@@ -83,9 +83,11 @@ feature -- Output
|
||||
local
|
||||
s: STRING
|
||||
do
|
||||
create s.make_empty
|
||||
a_response.set_value (a_node, "node")
|
||||
a_response.set_title (a_node.title)
|
||||
|
||||
a_response.set_value (a_node, "node")
|
||||
a_response.set_value (a_node.content_type, "optional_content_type")
|
||||
create s.make_empty
|
||||
append_content_as_html_to (a_node, False, s, a_response)
|
||||
a_response.set_main_content (s)
|
||||
end
|
||||
|
||||
@@ -48,6 +48,7 @@ feature -- Execution
|
||||
end
|
||||
end
|
||||
if l_node /= Void then
|
||||
set_optional_content_type (l_node.content_type)
|
||||
if
|
||||
attached node_api.node_type_for (l_node) as l_content_type and then
|
||||
attached node_api.node_type_webform_manager (l_content_type) as l_manager
|
||||
|
||||
@@ -265,7 +265,7 @@ feature -- Hooks
|
||||
if r.is_authenticated then
|
||||
r.add_error_message ("You are already signed in!")
|
||||
else
|
||||
r.set_value ("Login", "optional_content_type")
|
||||
r.set_optional_content_type ("Login")
|
||||
end
|
||||
r.execute
|
||||
end
|
||||
|
||||
@@ -218,9 +218,7 @@ feature -- Hooks
|
||||
if api.user_is_authenticated then
|
||||
r.add_error_message ("You are already signed in!")
|
||||
elseif req.is_get_request_method then
|
||||
r.set_value ("Login", "optional_content_type")
|
||||
|
||||
|
||||
r.set_optional_content_type ("Login")
|
||||
elseif req.is_post_request_method then
|
||||
create s.make_empty
|
||||
if attached req.string_item ("openid") as p_openid then
|
||||
|
||||
Reference in New Issue
Block a user