Renaming revert string to restore.
This commit is contained in:
@@ -351,15 +351,15 @@ feature -- Form
|
|||||||
f.extend (ts)
|
f.extend (ts)
|
||||||
end
|
end
|
||||||
f.extend_html_text ("<br/>")
|
f.extend_html_text ("<br/>")
|
||||||
f.extend_html_text ("<legend>Do you want to revert the current node?</legend>")
|
f.extend_html_text ("<legend>Do you want to restore the current node?</legend>")
|
||||||
if
|
if
|
||||||
a_node /= Void and then
|
a_node /= Void and then
|
||||||
a_node.id > 0
|
a_node.id > 0
|
||||||
then
|
then
|
||||||
create ts.make ("op")
|
create ts.make ("op")
|
||||||
ts.set_default_value ("Revert")
|
ts.set_default_value ("Restore")
|
||||||
fixme ("[
|
fixme ("[
|
||||||
ts.set_default_value (translation ("Revert"))
|
ts.set_default_value (translation ("Restore"))
|
||||||
]")
|
]")
|
||||||
f.extend (ts)
|
f.extend (ts)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ feature -- HTTP Methods
|
|||||||
do_trash (req, res)
|
do_trash (req, res)
|
||||||
elseif
|
elseif
|
||||||
attached {WSF_STRING} req.form_parameter ("op") as l_op and then
|
attached {WSF_STRING} req.form_parameter ("op") as l_op and then
|
||||||
l_op.value.same_string ("Revert")
|
l_op.value.same_string ("Restore")
|
||||||
then
|
then
|
||||||
do_restore (req, res)
|
do_restore (req, res)
|
||||||
end
|
end
|
||||||
@@ -194,7 +194,7 @@ feature -- HTTP Methods
|
|||||||
send_not_implemented ("REST API not yet implemented", req, res)
|
send_not_implemented ("REST API not yet implemented", req, res)
|
||||||
end
|
end
|
||||||
|
|
||||||
feature {NONE} -- Trash:Revert
|
feature {NONE} -- Trash:Restore
|
||||||
|
|
||||||
do_trash (req: WSF_REQUEST; res: WSF_RESPONSE)
|
do_trash (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
-- Trash a node from the database.
|
-- Trash a node from the database.
|
||||||
@@ -224,7 +224,7 @@ feature {NONE} -- Trash:Revert
|
|||||||
end
|
end
|
||||||
|
|
||||||
do_restore (req: WSF_REQUEST; res: WSF_RESPONSE)
|
do_restore (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
-- Revert a node: From {CMS_NODE_API}.trashed to {CMS_NODE_API}.not_published.
|
-- Restore a node: From {CMS_NODE_API}.trashed to {CMS_NODE_API}.not_published.
|
||||||
do
|
do
|
||||||
if attached current_user (req) as l_user then
|
if attached current_user (req) as l_user then
|
||||||
if attached {WSF_STRING} req.path_parameter ("id") as l_id then
|
if attached {WSF_STRING} req.path_parameter ("id") as l_id then
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ feature -- Change: Node
|
|||||||
l_time: DATE_TIME
|
l_time: DATE_TIME
|
||||||
do
|
do
|
||||||
create l_time.make_now_utc
|
create l_time.make_now_utc
|
||||||
write_information_log (generator + ".revert_node {" + a_id.out + "}")
|
write_information_log (generator + ".restore_node {" + a_id.out + "}")
|
||||||
|
|
||||||
error_handler.reset
|
error_handler.reset
|
||||||
create l_parameters.make (1)
|
create l_parameters.make (1)
|
||||||
@@ -319,7 +319,7 @@ feature {NONE} -- Queries
|
|||||||
-- Physical deletion with free metadata.
|
-- Physical deletion with free metadata.
|
||||||
|
|
||||||
sql_restore_node: STRING = "UPDATE nodes SET changed=:changed, status =:status WHERE nid=:nid"
|
sql_restore_node: STRING = "UPDATE nodes SET changed=:changed, status =:status WHERE nid=:nid"
|
||||||
-- Revert node to {CMS_NODE_API}.not_publised.
|
-- Restore node to {CMS_NODE_API}.not_publised.
|
||||||
|
|
||||||
-- sql_update_node_author: STRING = "UPDATE nodes SET author=:author WHERE nid=:nid;"
|
-- sql_update_node_author: STRING = "UPDATE nodes SET author=:author WHERE nid=:nid;"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user