- Removed CMS_REQUEST_UTIL - centralize a few request related code into CMS_API Added CMS_API.user, CMS_API.set_user (CMS_USER), ... and user related routines. Refactored Auth related code - added various abstractions to factorize implementation and harmonize solutions. - revisited the logout strategy. - updated the account info page, and remove info user should not care about. - simplified the process, and encourage auth module to follow same design. Added CMS_LINK helper routines to modify the related query string. Removed CMS_USER.profile (and related routines) - It was not used so far. - it will probably a specific module later, if needed. Update various module to avoid fetching user from sql directly, and let this task to CMS_USER_API. Removed CMS_NODE_API.node_author (a_node: CMS_NODE): detachable CMS_USER, - as the info is already in CMS_NODE.author Added CMS_RESPONSE.redirection_delay, if ever one code want to redirect after a few seconds. Added the request uri info to the not found cms response.
71 lines
1.4 KiB
Plaintext
71 lines
1.4 KiB
Plaintext
note
|
|
description: "Summary description for {NODE_VIEW_RESPONSE}."
|
|
date: "$Date$"
|
|
revision: "$Revision$"
|
|
|
|
class
|
|
NODE_VIEW_RESPONSE
|
|
|
|
inherit
|
|
NODE_RESPONSE
|
|
|
|
create
|
|
make
|
|
|
|
feature -- Access
|
|
|
|
node: detachable CMS_NODE
|
|
|
|
revision: INTEGER_64
|
|
-- If not zero, about history version of the node.
|
|
|
|
feature -- Element change
|
|
|
|
set_node (a_node: like node)
|
|
do
|
|
node := a_node
|
|
end
|
|
|
|
set_revision (a_rev: like revision)
|
|
do
|
|
revision := a_rev
|
|
end
|
|
|
|
feature -- Execution
|
|
|
|
process
|
|
-- Computed response message.
|
|
local
|
|
nid: INTEGER_64
|
|
l_node: like node
|
|
do
|
|
l_node := node
|
|
if l_node = Void then
|
|
nid := node_id_path_parameter
|
|
if nid > 0 then
|
|
l_node := node_api.node (nid)
|
|
end
|
|
end
|
|
if l_node /= Void then
|
|
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
|
|
then
|
|
l_manager.append_content_as_html_to_page (l_node, Current)
|
|
end
|
|
set_modification_date (l_node.modification_date)
|
|
elseif revision > 0 then
|
|
set_main_content ("Missing revision node!")
|
|
else
|
|
set_main_content ("Missing node!")
|
|
end
|
|
if revision > 0 then
|
|
add_warning_message ("The revisions let you track differences between multiple versions of a post.")
|
|
end
|
|
if l_node /= Void and revision > 0 then
|
|
set_title ("Revision #" + revision.out + " of " + html_encoded (l_node.title))
|
|
end
|
|
end
|
|
|
|
end
|