Cleaned up hooks related code, and always go via CMS_RESPONSE.hooks

This commit is contained in:
2015-08-12 17:50:23 +02:00
parent 46014da3d8
commit 1d7d79d69e
7 changed files with 17 additions and 105 deletions

View File

@@ -54,7 +54,7 @@ feature -- Execution
node_api.has_permission_for_action_on_node ("edit", l_node, user)
then
f := new_edit_form (l_node, url (location, Void), "edit-" + l_type.name, l_type)
invoke_form_alter (f, fd)
hooks.invoke_form_alter (f, fd, Current)
if request.is_post_request_method then
f.validation_actions.extend (agent edit_form_validate (?, b))
f.submit_actions.extend (agent edit_form_submit (?, l_node, l_type, b))
@@ -80,7 +80,7 @@ feature -- Execution
node_api.has_permission_for_action_on_node ("delete", l_node, user)
then
f := new_delete_form (l_node, url (location, Void), "delete-" + l_type.name, l_type)
invoke_form_alter (f, fd)
hooks.invoke_form_alter (f, fd, Current)
if request.is_post_request_method then
f.process (Current)
fd := f.last_data
@@ -104,7 +104,7 @@ feature -- Execution
node_api.has_permission_for_action_on_node ("trash", l_node, user)
then
f := new_trash_form (l_node, url (location, Void), "trash-" + l_type.name, l_type)
invoke_form_alter (f, fd)
hooks.invoke_form_alter (f, fd, Current)
if request.is_post_request_method then
f.process (Current)
fd := f.last_data
@@ -137,7 +137,7 @@ feature -- Execution
if has_permissions (<<"create any", "create " + l_type.name>>) then
if attached l_type.new_node (Void) as l_node then
f := new_edit_form (l_node, url (location, Void), "edit-" + l_type.name, l_type)
invoke_form_alter (f, fd)
hooks.invoke_form_alter (f, fd, Current)
if request.is_post_request_method then
f.validation_actions.extend (agent edit_form_validate (?, b))
f.submit_actions.extend (agent edit_form_submit (?, l_node, l_type, b))

View File

@@ -56,7 +56,6 @@ feature -- Execution
process
-- Computed response message.
local
b: detachable STRING_8
nid: INTEGER_64
l_node: like node
do