diff --git a/Models/CommentListMapper.php b/Models/CommentListMapper.php index 8a1dd59..a65ef7a 100755 --- a/Models/CommentListMapper.php +++ b/Models/CommentListMapper.php @@ -33,11 +33,11 @@ final class CommentListMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], - 'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'int', 'internal' => 'status'], - 'comments_list_allow_voting' => ['name' => 'comments_list_allow_voting', 'type' => 'bool', 'internal' => 'allowVoting'], - 'comments_list_allow_edit' => ['name' => 'comments_list_allow_edit', 'type' => 'bool', 'internal' => 'allowEdit'], - 'comments_list_allow_files' => ['name' => 'comments_list_allow_files', 'type' => 'bool', 'internal' => 'allowFiles'], + 'comments_list_id' => ['name' => 'comments_list_id', 'type' => 'int', 'internal' => 'id'], + 'comments_list_status' => ['name' => 'comments_list_status', 'type' => 'int', 'internal' => 'status'], + 'comments_list_allow_voting' => ['name' => 'comments_list_allow_voting', 'type' => 'bool', 'internal' => 'allowVoting'], + 'comments_list_allow_edit' => ['name' => 'comments_list_allow_edit', 'type' => 'bool', 'internal' => 'allowEdit'], + 'comments_list_allow_files' => ['name' => 'comments_list_allow_files', 'type' => 'bool', 'internal' => 'allowFiles'], ]; /** @@ -48,10 +48,10 @@ final class CommentListMapper extends DataMapperFactory */ public const HAS_MANY = [ 'comments' => [ - 'mapper' => CommentMapper::class, - 'table' => 'comments_comment', - 'self' => 'comments_comment_list', - 'external' => null, + 'mapper' => CommentMapper::class, + 'table' => 'comments_comment', + 'self' => 'comments_comment_list', + 'external' => null, ], ]; diff --git a/Models/CommentMapper.php b/Models/CommentMapper.php index 4c242ec..4800a6e 100755 --- a/Models/CommentMapper.php +++ b/Models/CommentMapper.php @@ -35,14 +35,14 @@ final class CommentMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'comments_comment_id' => ['name' => 'comments_comment_id', 'type' => 'int', 'internal' => 'id'], - 'comments_comment_title' => ['name' => 'comments_comment_title', 'type' => 'string', 'internal' => 'title'], - 'comments_comment_status' => ['name' => 'comments_comment_status', 'type' => 'int', 'internal' => 'status'], - 'comments_comment_content' => ['name' => 'comments_comment_content', 'type' => 'string', 'internal' => 'content'], - 'comments_comment_content_raw' => ['name' => 'comments_comment_content_raw', 'type' => 'string', 'internal' => 'contentRaw'], - 'comments_comment_list' => ['name' => 'comments_comment_list', 'type' => 'int', 'internal' => 'list'], - 'comments_comment_ref' => ['name' => 'comments_comment_ref', 'type' => 'int', 'internal' => 'ref'], - 'comments_comment_created_by' => ['name' => 'comments_comment_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], + 'comments_comment_id' => ['name' => 'comments_comment_id', 'type' => 'int', 'internal' => 'id'], + 'comments_comment_title' => ['name' => 'comments_comment_title', 'type' => 'string', 'internal' => 'title'], + 'comments_comment_status' => ['name' => 'comments_comment_status', 'type' => 'int', 'internal' => 'status'], + 'comments_comment_content' => ['name' => 'comments_comment_content', 'type' => 'string', 'internal' => 'content'], + 'comments_comment_content_raw' => ['name' => 'comments_comment_content_raw', 'type' => 'string', 'internal' => 'contentRaw'], + 'comments_comment_list' => ['name' => 'comments_comment_list', 'type' => 'int', 'internal' => 'list'], + 'comments_comment_ref' => ['name' => 'comments_comment_ref', 'type' => 'int', 'internal' => 'ref'], + 'comments_comment_created_by' => ['name' => 'comments_comment_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], 'comments_comment_created_at' => ['name' => 'comments_comment_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], ]; @@ -54,12 +54,12 @@ final class CommentMapper extends DataMapperFactory */ public const BELONGS_TO = [ 'createdBy' => [ - 'mapper' => AccountMapper::class, - 'external' => 'comments_comment_created_by', + 'mapper' => AccountMapper::class, + 'external' => 'comments_comment_created_by', ], 'list' => [ - 'mapper' => CommentListMapper::class, - 'external' => 'comments_comment_list', + 'mapper' => CommentListMapper::class, + 'external' => 'comments_comment_list', ], ]; diff --git a/Models/CommentVoteMapper.php b/Models/CommentVoteMapper.php index fd12782..f2f9e3a 100755 --- a/Models/CommentVoteMapper.php +++ b/Models/CommentVoteMapper.php @@ -33,11 +33,11 @@ final class CommentVoteMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'comments_comment_vote_id' => ['name' => 'comments_comment_vote_id', 'type' => 'int', 'internal' => 'id'], - 'comments_comment_vote_score' => ['name' => 'comments_comment_vote_score', 'type' => 'int', 'internal' => 'score'], - 'comments_comment_vote_comment' => ['name' => 'comments_comment_vote_comment', 'type' => 'int', 'internal' => 'comment', 'readonly' => true], - 'comments_comment_vote_created_by' => ['name' => 'comments_comment_vote_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], - 'comments_comment_vote_created_at' => ['name' => 'comments_comment_vote_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], + 'comments_comment_vote_id' => ['name' => 'comments_comment_vote_id', 'type' => 'int', 'internal' => 'id'], + 'comments_comment_vote_score' => ['name' => 'comments_comment_vote_score', 'type' => 'int', 'internal' => 'score'], + 'comments_comment_vote_comment' => ['name' => 'comments_comment_vote_comment', 'type' => 'int', 'internal' => 'comment', 'readonly' => true], + 'comments_comment_vote_created_by' => ['name' => 'comments_comment_vote_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], + 'comments_comment_vote_created_at' => ['name' => 'comments_comment_vote_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], ]; /** diff --git a/Theme/Backend/Components/Comment/create.tpl.php b/Theme/Backend/Components/Comment/create.tpl.php index 56ad453..bed72ed 100755 --- a/Theme/Backend/Components/Comment/create.tpl.php +++ b/Theme/Backend/Components/Comment/create.tpl.php @@ -1,4 +1,16 @@ -