Update code to use CMS_API.unset_path_alias

Updated CMS_NODE_STORAGE_SQL renamed sql_restore_node as sql_update_note_status, updated
related code.
This commit is contained in:
jvelilla
2015-12-02 16:14:54 -03:00
parent fade19bbee
commit a11a93c285
2 changed files with 7 additions and 11 deletions

View File

@@ -242,15 +242,19 @@ feature {NONE} -- Trash:Restore
do_delete (req: WSF_REQUEST; res: WSF_RESPONSE)
-- Delete a node from the database.
local
l_source: STRING
do
if attached current_user (req) as l_user then
if attached {WSF_STRING} req.path_parameter ("id") as l_id then
if
l_id.is_integer and then
attached node_api.node (l_id.integer_value) as l_node
attached {CMS_NODE} node_api.node (l_id.integer_value) as l_node
then
if node_api.has_permission_for_action_on_node ("delete", l_node, current_user (req)) then
node_api.delete_node (l_node)
l_source := node_api.node_path (l_node)
api.unset_path_alias (l_source, api.location_alias (l_source))
res.send (create {CMS_REDIRECTION_RESPONSE_MESSAGE}.make (req.absolute_script_url ("")))
else
send_access_denied (req, res)