diff --git a/modules/admin/handler/cms_admin_response.e b/modules/admin/handler/cms_admin_response.e index 8f7be4b..ad4f6a9 100644 --- a/modules/admin/handler/cms_admin_response.e +++ b/modules/admin/handler/cms_admin_response.e @@ -1,5 +1,5 @@ note - description: "Summary description for {CMS_ADMIN_RESPONSE}." + description: "Response for the /admin request." date: "$Date$" revision: "$Revision$" @@ -29,6 +29,7 @@ feature -- Process l_admin_links.force (["core", <<"view logs">>, local_link ("Logs", "admin/logs"), "View logs"]) l_admin_links.force (["support", <<"admin cache">>, local_link ("Cache", "admin/cache"), "Clear caches"]) l_admin_links.force (["support", <<"admin export">>, local_link ("Export", "admin/export"), "Export CMS contents, and modules contents."]) + l_admin_links.force (["support", <<"admin import">>, local_link ("Export", "admin/import"), "Import CMS contents, and modules contents."]) create categories.make_caseless (3) across l_admin_links as ic diff --git a/modules/comments/persistence/cms_comments_storage_sql.e b/modules/comments/persistence/cms_comments_storage_sql.e index 374a979..eae5279 100644 --- a/modules/comments/persistence/cms_comments_storage_sql.e +++ b/modules/comments/persistence/cms_comments_storage_sql.e @@ -1,7 +1,7 @@ note description: "Interface for accessing user profile contents from SQL database." date: "$Date: 2015-05-21 14:46:00 +0100$" - revision: "$Revision: 96616 $" + revision: "$Revision: 99775 $" class CMS_COMMENTS_STORAGE_SQL @@ -86,7 +86,7 @@ feature -- Change l_parameters.put (a_comment.modification_date, "changed") l_parameters.put (a_comment.status, "status") - if attached a_comment.parent as p then + if attached a_comment.parent as p and then p.has_id then l_parameters.put (p.id, "parent") else l_parameters.put (0, "parent") @@ -180,11 +180,11 @@ feature {NONE} -- Queries Sql_last_inserted_comment_id: STRING = "SELECT MAX(cid) FROM comments;" - sql_select_comment_by_id: STRING = "SELECT cid,content,format,author,author_name,created,changed,status,parent,entity,entity_type FROM comments WHERE cid=:cid;" + sql_select_comment_by_id: STRING = "SELECT cid, content, format, author, author_name, created, changed, status, parent, entity, entity_type FROM comments WHERE cid=:cid ;" - sql_select_comments_for_content: STRING = "SELECT cid,content,format,author,author_name,created,changed,status,parent,entity,entity_type FROM comments WHERE entity=:content_id;" + sql_select_comments_for_content: STRING = "SELECT cid, content, format, author, author_name, created, changed, status, parent, entity, entity_type FROM comments WHERE entity=:content_id ;" - sql_insert_comment: STRING = "INSERT INTO comments (content,format,author,author_name,created,changed,status,parent,entity,entity_type) VALUES (:content,:format,:author,:author_name,:created,:changed,:status,:parent,:entity,:entity_type);" - sql_update_comment: STRING = "UPDATE comments SET content=:content,format=:format,author=:author,author_name=:author_name,created=:created,changed=:changed,status=:status,parent=:parent,entity=:entity,entity_type=:entity_type WHERE cid=:cid ;" + sql_insert_comment: STRING = "INSERT INTO comments (content, format, author, author_name, created, changed, status, parent, entity, entity_type) VALUES (:content, :format, :author, :author_name, :created, :changed, :status, :parent, :entity, :entity_type) ;" + sql_update_comment: STRING = "UPDATE comments SET content=:content, format=:format, author=:author, author_name=:author_name, created=:created, changed=:changed, status=:status, parent=:parent, entity=:entity, entity_type=:entity_type WHERE cid=:cid ;" end diff --git a/modules/node/import/cms_import_node_utilities.e b/modules/node/import/cms_import_node_utilities.e index 406302e..d107e61 100644 --- a/modules/node/import/cms_import_node_utilities.e +++ b/modules/node/import/cms_import_node_utilities.e @@ -25,8 +25,6 @@ feature -- Comments helpers import_comments_file_for_entity (fn: PATH; a_entity: CMS_CONTENT; api: CMS_API; a_import_ctx: CMS_IMPORT_CONTEXT) local - s: STRING - jp: JSON_PARSER l_comment: CMS_COMMENT l_log: STRING_8 do