From 2f8c4ca77da5fed48fee64b90994f25d1a264309 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 6 Feb 2026 18:06:16 +0900 Subject: [PATCH 01/11] Enable customizing the number of comments/replies required to prevent editing or deleting a post --- modules/admin/tpl/js/admin.js | 11 +++-- modules/board/board.admin.controller.php | 16 ++++++- modules/board/board.controller.php | 20 +++++---- modules/board/board.view.php | 18 +++++--- modules/board/lang/en.php | 19 ++++---- modules/board/lang/ko.php | 17 +++++--- modules/board/lang/zh-CN.php | 4 +- modules/board/tpl/board_insert.html | 55 ++++++++++++++++++------ 8 files changed, 110 insertions(+), 50 deletions(-) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 4d3d52c45..6ee132312 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -347,9 +347,14 @@ jQuery(function($){ $.fn.checkToggle = function(){ function check(){ setTimeout(function(){ - $(':checked').parent('label').addClass('checked'); - $(':not(":checked")').parent('label').removeClass('checked'); - },0); + $(':radio, :checkbox').each(function() { + if ($(this).is(':checked')) { + $(this).parent('label').addClass('checked'); + } else { + $(this).parent('label').removeClass('checked'); + } + }); + }, 0); } this.change(check); check(); diff --git a/modules/board/board.admin.controller.php b/modules/board/board.admin.controller.php index d1f0c329c..b6c35ca40 100644 --- a/modules/board/board.admin.controller.php +++ b/modules/board/board.admin.controller.php @@ -58,7 +58,21 @@ class BoardAdminController extends Board { if($args->use_anonymous != 'Y') $args->use_anonymous = 'N'; if($args->anonymous_except_admin != 'Y') $args->anonymous_except_admin = 'N'; if($args->consultation != 'Y') $args->consultation = 'N'; - if($args->protect_content != 'Y') $args->protect_content = 'N'; + + // Protection settings + if ($args->protect_content != 'Y') $args->protect_content = 'N'; + if ($args->protect_document_regdate === 'Y') + { + $args->protect_document_regdate = intval($args->protect_document_regdate_limit ?? 0) ?: null; + } + if ($args->protect_comment_regdate === 'Y') + { + $args->protect_comment_regdate = intval($args->protect_comment_regdate_limit ?? 0) ?: null; + } + unset($args->protect_document_regdate_limit); + unset($args->protect_comment_regdate_limit); + + // Admin protection settings if($this->user->isAdmin()) { if($args->protect_admin_content_update != 'Y') $args->protect_admin_content_update = 'N'; diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 8bed7c029..12f873ef0 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -171,9 +171,10 @@ class BoardController extends Board // Protect document by comment if($this->module_info->protect_content == 'Y' || $this->module_info->protect_update_content == 'Y') { - if($oDocument->get('comment_count') > 0 && !$this->grant->manager) + $comment_limit = $this->module_info->protect_update_content_limit ?? 1; + if($oDocument->get('comment_count') >= $comment_limit && !$this->grant->manager) { - throw new Rhymix\Framework\Exception('msg_protect_update_content'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_protect_update_content'), $comment_limit)); } } @@ -358,9 +359,10 @@ class BoardController extends Board // check protect content if($this->module_info->protect_content == 'Y' || $this->module_info->protect_delete_content == 'Y') { - if($oDocument->get('comment_count') > 0 && $this->grant->manager == false) + $comment_limit = $this->module_info->protect_delete_content_limit ?? 1; + if($oDocument->get('comment_count') >= $comment_limit && $this->grant->manager == false) { - throw new Rhymix\Framework\Exception('msg_protect_delete_content'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_protect_delete_content'), $comment_limit)); } } @@ -538,10 +540,11 @@ class BoardController extends Board $comment = CommentModel::getComment($obj->comment_srl); if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false) { + $childs_limit = $this->module_info->protect_update_comment_limit ?? 1; $childs = CommentModel::getChildComments($obj->comment_srl); - if(count($childs) > 0) + if(count($childs) >= $childs_limit) { - throw new Rhymix\Framework\Exception('msg_board_update_protect_comment'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_board_update_protect_comment'), $childs_limit)); } } } @@ -656,10 +659,11 @@ class BoardController extends Board $childs = null; if($this->module_info->protect_delete_comment === 'Y' && $this->grant->manager == false) { + $childs_limit = $this->module_info->protect_delete_comment_limit ?? 1; $childs = CommentModel::getChildComments($comment_srl); - if(count($childs) > 0) + if(count($childs) >= $childs_limit) { - throw new Rhymix\Framework\Exception('msg_board_delete_protect_comment'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_board_delete_protect_comment'), $childs_limit)); } } diff --git a/modules/board/board.view.php b/modules/board/board.view.php index e6cd6ee2d..e9f19b1e9 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -878,9 +878,10 @@ class BoardView extends Board } if ($this->module_info->protect_content === 'Y' || $this->module_info->protect_update_content === 'Y') { - if($oDocument->get('comment_count') > 0 && $this->grant->manager == false) + $comment_limit = $this->module_info->protect_update_content_limit ?? 1; + if($oDocument->get('comment_count') >= $comment_limit && $this->grant->manager == false) { - throw new Rhymix\Framework\Exception('msg_protect_update_content'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_protect_update_content'), $comment_limit)); } } @@ -1103,9 +1104,10 @@ class BoardView extends Board if($this->module_info->protect_content == "Y" || $this->module_info->protect_delete_content == 'Y') { + $comment_limit = $this->module_info->protect_delete_content_limit ?? 1; if($oDocument->get('comment_count')>0 && $this->grant->manager == false) { - throw new Rhymix\Framework\Exception('msg_protect_delete_content'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_protect_delete_content'), $comment_limit)); } } @@ -1299,10 +1301,11 @@ class BoardView extends Board } if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false) { + $childs_limit = $this->module_info->protect_update_comment_limit ?? 1; $childs = CommentModel::getChildComments($comment_srl); - if(count($childs) > 0) + if(count($childs) >= $childs_limit) { - throw new Rhymix\Framework\Exception('msg_board_update_protect_comment'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_board_update_protect_comment'), $childs_limit)); } } @@ -1387,10 +1390,11 @@ class BoardView extends Board if($this->module_info->protect_delete_comment === 'Y' && $this->grant->manager == false) { + $childs_limit = $this->module_info->protect_delete_comment_limit ?? 1; $childs = CommentModel::getChildComments($comment_srl); - if(count($childs) > 0) + if(count($childs) >= $childs_limit) { - throw new Rhymix\Framework\Exception('msg_board_delete_protect_comment'); + throw new Rhymix\Framework\Exception(sprintf(lang('msg_board_delete_protect_comment'), $childs_limit)); } } diff --git a/modules/board/lang/en.php b/modules/board/lang/en.php index 9c9b4f9b0..88f07c98b 100644 --- a/modules/board/lang/en.php +++ b/modules/board/lang/en.php @@ -44,7 +44,6 @@ $lang->about_secret = 'Users will be able to write secret posts or comments.'; $lang->about_admin_mail = 'Send an e-mail when a new post or comment is submitted. Separate multiple recipients with a comma.'; $lang->about_list_config = 'If using list-style skin, you may arrange items to display. However, this feature might not be availble for non-official skins. If you double-click target items and display items, then you can add / remove them'; $lang->about_use_status = 'Please select status that can be selected when you write a post.'; -$lang->about_protect_comment = 'Prevent updating or deleting a comment if it has children.'; $lang->about_update_log = 'Store a log of every version of a post every time it is updated.'; $lang->skip_bottom_list_for_olddoc = 'Do not calculate the bottom list exactly when viewing an old post.'; $lang->skip_bottom_list_for_robot = 'Do not calculate the bottom list exactly when a robot is visiting.'; @@ -59,7 +58,7 @@ $lang->hide_category = 'Hide categories'; $lang->about_hide_category = 'Temporarily disable categories. Existing categories will not be deleted.
Unless you select the option below, users may not be able to write anymore.'; $lang->allow_no_category = 'Do not require category'; $lang->about_allow_no_category = 'Allow posting without selecting a category.
Admins are never required to select a category.'; -$lang->protect_content = 'Protect Content'; +$lang->protect_content = 'Protect Post'; $lang->protect_comment = 'Protect Comment'; $lang->protect_admin_content = 'Protect Admin Content'; $lang->protect_regdate = 'Update/Delete Time Limit'; @@ -73,15 +72,19 @@ $lang->about_inline_data_url_limit = 'Restrict data: URLs that can be used to ev $lang->update_order_on_comment = 'Update Post on New Comment'; $lang->about_update_order_on_comment = 'When a new comment is posted, update the update timestamp of the parent post. This is needed for forums.'; $lang->about_filter_specialchars = 'Prevent use of excessive Unicode accents, RLO characters, and other symbols that hinder readability.'; -$lang->about_protect_regdate = 'Prevent updating or deleting a post or comment after a certain amount of time has passed. (Unit: day)'; -$lang->about_protect_content = 'Prevent updating a post if there are comments on it.'; +$lang->about_protect_content_update = 'Prevent updating a post if it has %d or more comments.'; +$lang->about_protect_content_delete = 'Prevent deleting a post if it has %d or more comments.'; +$lang->about_protect_comment_update = 'Prevent updating a comment if it has %d or more replies.'; +$lang->about_protect_comment_delete = 'Prevent deleting a comment if it has %d or more replies.'; +$lang->about_protect_document_regdate = 'Prevent updating or deleting a post after %d days.'; +$lang->about_protect_comment_regdate = 'Prevent updating or deleting a comment after %d days.'; $lang->about_protect_admin_content = 'Prevent updating or deleting a post or comment written by the administrator, even by a user who is permitted to manage the board.'; -$lang->msg_protect_delete_content = 'You cannot delete a post with comments on it.'; -$lang->msg_protect_update_content = 'You cannot update a post with comments on it.'; +$lang->msg_protect_update_content = 'You cannot update a post with %d or more comments on it.'; +$lang->msg_protect_delete_content = 'You cannot delete a post with %d or more comments on it.'; +$lang->msg_board_update_protect_comment = 'You cannot update a comment with %d or more replies on it.'; +$lang->msg_board_delete_protect_comment = 'You cannot delete a comment with %d or more replies on it.'; $lang->msg_admin_document_no_modify = 'You cannot edit the administrator\'s post.'; $lang->msg_admin_comment_no_modify = 'You cannot edit the administrator\'s comment.'; -$lang->msg_board_delete_protect_comment = 'You cannot delete a comment when there are replies.'; -$lang->msg_board_update_protect_comment = 'You cannot update a comment when there are replies.'; $lang->msg_protect_regdate_document = 'You cannot update or delete a post after %d days.'; $lang->msg_protect_regdate_comment = 'You cannot update or delete a comment after %d days.'; $lang->msg_dont_have_update_log = 'This post has no update log.'; diff --git a/modules/board/lang/ko.php b/modules/board/lang/ko.php index 0820f57ed..f53cf5db6 100644 --- a/modules/board/lang/ko.php +++ b/modules/board/lang/ko.php @@ -44,7 +44,6 @@ $lang->about_secret = '게시판 및 댓글의 비밀글 기능을 사용할 수 $lang->about_admin_mail = '새 글이나 댓글이 등록되면 지정된 메일 주소로 알림을 받습니다. 여러 메일 주소를 지정하려면 쉼표(,)로 구분하세요.'; $lang->about_list_config = '게시판의 목록형식 사용시 원하는 항목들로 배치를 할 수 있습니다. 단 스킨에서 지원하지 않는 경우 불가능합니다. 대상항목/ 표시항목의 항목을 더블클릭하면 추가/ 제거가 됩니다.'; $lang->about_use_status = '글 작성 시 선택할 수 있는 상태를 지정해주세요.'; -$lang->about_protect_comment = '댓글의 댓글이 있을경우 해당댓글을 삭제 및 수정을 할 수 없도록 합니다.'; $lang->about_update_log = '게시글을 수정할 경우 수정한 내역을 저장하도록 합니다.'; $lang->skip_bottom_list_for_olddoc = '오래된 게시물 열람시 하단 목록을 정확하게 계산하지 않음'; $lang->skip_bottom_list_for_robot = '로봇 방문시 하단 목록을 정확하게 계산하지 않음'; @@ -73,15 +72,19 @@ $lang->about_inline_data_url_limit = 'data: URL을 사용하여 첨부 제한을 $lang->update_order_on_comment = '댓글 작성시 글 수정 시각 갱신'; $lang->about_update_order_on_comment = '댓글이 작성되면 해당 글의 수정 시각을 갱신합니다. 포럼형 게시판, 최근 댓글 표시 기능 등에 필요합니다.'; $lang->about_filter_specialchars = '가독성에 악영향을 주는 과도한 유니코드 악센트 기호의 조합, RLO 문자 등의 사용을 금지합니다.'; -$lang->about_protect_regdate = '글이나 댓글을 작성한 후 일정 기간이 지나면 수정 또는 삭제할 수 없도록 합니다. (단위 : day)'; -$lang->about_protect_content = '댓글이 달린 글은 수정 또는 삭제할 수 없도록 합니다.'; +$lang->about_protect_content_update = '댓글이 %d개 이상 달린 글은 수정할 수 없도록 합니다.'; +$lang->about_protect_content_delete = '댓글이 %d개 이상 달린 글은 삭제할 수 없도록 합니다.'; +$lang->about_protect_comment_update = '대댓글이 %d개 이상 달린 댓글은 수정할 수 없도록 합니다.'; +$lang->about_protect_comment_delete = '대댓글이 %d개 이상 달린 댓글은 삭제할 수 없도록 합니다.'; +$lang->about_protect_document_regdate = '작성 후 %d일 이상 지난 글은 수정 또는 삭제할 수 없도록 합니다.'; +$lang->about_protect_comment_regdate = '작성 후 %d일 이상 지난 댓글은 수정 또는 삭제할 수 없도록 합니다.'; $lang->about_protect_admin_content = '최고관리자가 작성한 글이나 댓글은 게시판 관리 권한이 있는 회원이라도 수정 또는 삭제할 수 없도록 합니다.'; -$lang->msg_protect_delete_content = '댓글이 달린 글은 삭제할 수 없습니다.'; -$lang->msg_protect_update_content = '댓글이 달린 글은 수정할 수 없습니다.'; +$lang->msg_protect_update_content = '댓글이 %d개 이상 달린 글은 수정할 수 없습니다.'; +$lang->msg_protect_delete_content = '댓글이 %d개 이상 달린 글은 삭제할 수 없습니다.'; +$lang->msg_board_update_protect_comment = '대댓글이 %d개 이상 달린 댓글은 수정할 수 없습니다.'; +$lang->msg_board_delete_protect_comment = '대댓글이 %d개 이상 달린 댓글은 삭제할 수 없습니다.'; $lang->msg_admin_document_no_modify = '최고관리자의 게시물을 수정할 권한이 없습니다.'; $lang->msg_admin_comment_no_modify = '최고관리자의 댓글을 수정할 권한이 없습니다.'; -$lang->msg_board_delete_protect_comment = '대댓글이 달린 댓글은 삭제할 수 없습니다.'; -$lang->msg_board_update_protect_comment = '대댓글이 달린 댓글은 수정할 수 없습니다.'; $lang->msg_protect_regdate_document = '%d일 이상 지난 글은 수정 또는 삭제할 수 없습니다.'; $lang->msg_protect_regdate_comment = '%d일 이상 지난 댓글은 수정 또는 삭제할 수 없습니다.'; $lang->msg_dont_have_update_log = '업데이트 로그가 기록되어 있지 않은 게시글입니다.'; diff --git a/modules/board/lang/zh-CN.php b/modules/board/lang/zh-CN.php index 1f9196da7..c399112cb 100644 --- a/modules/board/lang/zh-CN.php +++ b/modules/board/lang/zh-CN.php @@ -72,8 +72,8 @@ $lang->about_filter_specialchars = '禁止使用影响阅读的内容的符号 $lang->about_non_login_vote = '非会员也可以推荐。'; $lang->about_protect_regdate = '发布帖子或回复过一定时间的话无法修改或删除。(单位:天)'; $lang->about_protect_content = '无法删除或修改有回复的帖子。'; -$lang->msg_protect_delete_content = '无法删除有回复的帖子。'; -$lang->msg_protect_update_content = '无法修改有回复的帖子。'; +$lang->msg_protect_delete_content = '评论数超过 %d 条的帖子无法删除。'; +$lang->msg_protect_update_content = '评论数超过 %d 条的帖子无法编辑。'; $lang->msg_admin_document_no_modify = '无法修改管理员的帖子。'; $lang->msg_admin_comment_no_modify = '无法修改管理员的回复。'; $lang->msg_board_delete_protect_comment = '回复里有他人回复的时候无法删除。'; diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 0478aa728..97b429794 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -362,17 +362,52 @@
- - -

{$lang->about_protect_content}

+ +
- - -

{$lang->about_protect_comment}

+ + +
+
+
+ +
+ +
@@ -385,14 +420,6 @@ -
- -
- {$lang->document} : - {$lang->comment} : -

{$lang->about_protect_regdate}

-
-
From 867014d0f4724dd34dc89d27184b4804073b4eff Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 6 Feb 2026 18:13:40 +0900 Subject: [PATCH 02/11] Don't filter by extra var lang when sorting by numeric value --- modules/document/document.model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/document/document.model.php b/modules/document/document.model.php index ee7165775..c12daa936 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -1558,13 +1558,13 @@ class DocumentModel extends Document if($searchOpt->isExtraVars) { $args->sort_eid = $args->sort_index; - $args->sort_lang = Context::getLangType(); if ($searchOpt->isExtraVarsSortAsNumber ?? false) { $args->sort_index = 'extra_sort.sort_value'; } else { + $args->sort_lang = Context::getLangType(); $args->sort_index = 'extra_sort.value'; } } From 0e013367a0ab6b7d0435395952d5abfbbeff9da5 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 6 Feb 2026 21:48:23 +0900 Subject: [PATCH 03/11] Fix misspelled variables and incorrect config references --- modules/board/board.controller.php | 12 ++++++------ modules/board/board.view.php | 28 ++++++++++++++-------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 12f873ef0..36875a087 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -597,11 +597,11 @@ class BoardController extends Board { if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false) { - if($comment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) + if($comment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_comment_regdate.' day'))) { $format = lang('msg_protect_regdate_comment'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $message = sprintf($format, $this->module_info->protect_comment_regdate); + throw new Rhymix\Framework\Exception($message); } } // check the grant @@ -678,11 +678,11 @@ class BoardController extends Board if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false) { - if($comment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) + if($comment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_comment_regdate.' day'))) { $format = lang('msg_protect_regdate_comment'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $message = sprintf($format, $this->module_info->protect_comment_regdate); + throw new Rhymix\Framework\Exception($message); } } // generate comment controller object diff --git a/modules/board/board.view.php b/modules/board/board.view.php index e9f19b1e9..117ff0219 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -872,8 +872,8 @@ class BoardView extends Board if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { $format = lang('msg_protect_regdate_document'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $message = sprintf($format, $this->module_info->protect_document_regdate); + throw new Rhymix\Framework\Exception($message); } } if ($this->module_info->protect_content === 'Y' || $this->module_info->protect_update_content === 'Y') @@ -1096,18 +1096,18 @@ class BoardView extends Board { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { - $format = lang('msg_protect_regdate_document'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $format = lang('msg_protect_regdate_document'); + $message = sprintf($format, $this->module_info->protect_document_regdate); + throw new Rhymix\Framework\Exception($message); } } if($this->module_info->protect_content == "Y" || $this->module_info->protect_delete_content == 'Y') { $comment_limit = $this->module_info->protect_delete_content_limit ?? 1; - if($oDocument->get('comment_count')>0 && $this->grant->manager == false) + if($oDocument->get('comment_count') >= $comment_limit && $this->grant->manager == false) { - throw new Rhymix\Framework\Exception(sprintf(lang('msg_protect_delete_content'), $comment_limit)); + return $this->dispBoardMessage(sprintf(lang('msg_protect_delete_content'), $comment_limit)); } } @@ -1292,11 +1292,11 @@ class BoardView extends Board if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false) { - if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) + if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_comment_regdate.' day'))) { - $format = lang('msg_protect_regdate_comment'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $format = lang('msg_protect_regdate_comment'); + $message = sprintf($format, $this->module_info->protect_comment_regdate); + throw new Rhymix\Framework\Exception($message); } } if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false) @@ -1380,11 +1380,11 @@ class BoardView extends Board if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false) { - if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) + if($oComment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_comment_regdate.' day'))) { $format = lang('msg_protect_regdate_comment'); - $massage = sprintf($format, $this->module_info->protect_document_regdate); - throw new Rhymix\Framework\Exception($massage); + $message = sprintf($format, $this->module_info->protect_comment_regdate); + throw new Rhymix\Framework\Exception($message); } } From 4339d01a75a546635cadcd79d566b3a159e398e9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sat, 7 Feb 2026 21:10:34 +0900 Subject: [PATCH 04/11] Update Daum/Kakao postcode API URL #2672 --- modules/krzip/lang/en.php | 2 +- modules/krzip/lang/ko.php | 2 +- modules/krzip/tpl/js/daumapi.js | 2 +- modules/krzip/tpl/template.daumapi.html | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/krzip/lang/en.php b/modules/krzip/lang/en.php index 0fc24fd4f..6a13a8046 100644 --- a/modules/krzip/lang/en.php +++ b/modules/krzip/lang/en.php @@ -1,7 +1,7 @@ krzip = 'Korean Postal Code'; $lang->cmd_krzip_api_type = 'Select API Provider'; -$lang->cmd_krzip_daumapi = 'Daum-Kakao API'; +$lang->cmd_krzip_daumapi = 'Kakao API'; $lang->cmd_krzip_epostapi = 'Korea Post API'; $lang->cmd_krzip_postcodify = 'Postcodify'; $lang->cmd_krzip_regkey = 'Registration Key'; diff --git a/modules/krzip/lang/ko.php b/modules/krzip/lang/ko.php index c7293c3cf..d1c3fd193 100644 --- a/modules/krzip/lang/ko.php +++ b/modules/krzip/lang/ko.php @@ -1,7 +1,7 @@ krzip = '한국 우편번호'; $lang->cmd_krzip_api_type = 'API 선택'; -$lang->cmd_krzip_daumapi = '다음 우편번호'; +$lang->cmd_krzip_daumapi = '카카오 우편번호'; $lang->cmd_krzip_epostapi = '우체국 우편번호'; $lang->cmd_krzip_postcodify = 'Postcodify'; $lang->cmd_krzip_regkey = '등록키'; diff --git a/modules/krzip/tpl/js/daumapi.js b/modules/krzip/tpl/js/daumapi.js index 49db03274..a8170e5e6 100644 --- a/modules/krzip/tpl/js/daumapi.js +++ b/modules/krzip/tpl/js/daumapi.js @@ -24,7 +24,7 @@ guide : $this.find(".krzip-guide") }; - var krzip = new daum.Postcode({ + var krzip = new kakao.Postcode({ oncomplete: function (response) { var fullAddr = "", extraAddr = ""; diff --git a/modules/krzip/tpl/template.daumapi.html b/modules/krzip/tpl/template.daumapi.html index 1270cbd00..95322eef5 100644 --- a/modules/krzip/tpl/template.daumapi.html +++ b/modules/krzip/tpl/template.daumapi.html @@ -1,8 +1,8 @@ - + + + - - From b9a512c007b79490260b1cb3e520681582c5c185 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 8 Feb 2026 10:56:28 +0900 Subject: [PATCH 05/11] Fix add IP to spamfilter menu not working --- modules/comment/comment.model.php | 2 +- modules/document/document.model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/comment/comment.model.php b/modules/comment/comment.model.php index 3ac2dd1e1..9ee84cbe0 100644 --- a/modules/comment/comment.model.php +++ b/modules/comment/comment.model.php @@ -113,7 +113,7 @@ class CommentModel extends Comment $url = getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList', 'search_target', 'ipaddress', 'search_keyword', $oComment->getIpAddress()); $oCommentController->addCommentPopupMenu($url, 'cmd_search_by_ipaddress', '', 'TraceByIpaddress'); - $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oComment->getIpAddress()); + $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_json('spamfilter.procSpamfilterAdminInsertDeniedIP', params)", $oComment->getIpAddress()); $oCommentController->addCommentPopupMenu($url, 'cmd_add_ip_to_spamfilter', '', 'javascript'); } } diff --git a/modules/document/document.model.php b/modules/document/document.model.php index c12daa936..6a3137c03 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -600,7 +600,7 @@ class DocumentModel extends Document $url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->getIpAddress()); $oDocumentController->addDocumentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress'); - $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_xml('spamfilter', 'procSpamfilterAdminInsertDeniedIP', params, completeCallModuleAction)", $oDocument->getIpAddress()); + $url = sprintf("var params = new Array(); params['ipaddress_list']='%s'; exec_json('spamfilter.procSpamfilterAdminInsertDeniedIP', params)", $oDocument->getIpAddress()); $oDocumentController->addDocumentPopupMenu($url,'cmd_add_ip_to_spamfilter','','javascript'); } } From ee5418d9d5b5ac5f47dde1d94f422c1e85a268a0 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 8 Feb 2026 11:02:50 +0900 Subject: [PATCH 06/11] Clean up message module config JS --- .../admin/controllers/maintenance/Cleanup.php | 1 + modules/message/tpl/filter/insert_config.xml | 7 ----- modules/message/tpl/js/config.js | 30 +++++-------------- 3 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 modules/message/tpl/filter/insert_config.xml diff --git a/modules/admin/controllers/maintenance/Cleanup.php b/modules/admin/controllers/maintenance/Cleanup.php index 1ea397361..a8906dbe4 100644 --- a/modules/admin/controllers/maintenance/Cleanup.php +++ b/modules/admin/controllers/maintenance/Cleanup.php @@ -441,6 +441,7 @@ class Cleanup extends Base 'modules/install/tpl/js/install_admin.js' => 'deleted:xe', 'modules/integration_search/skins/default/trackback.html' => 'deleted', 'modules/member/skins/default/filter/find_member_account_by_question.xml' => 'deleted:xe', + 'modules/message/tpl/filter/' => 'deleted:xe', 'modules/module/schemas/site_admin.xml' => 'deleted', 'modules/module/tpl/css/module_admin.less' => 'deleted', 'modules/page/page.wap.php' => 'deleted:xe', diff --git a/modules/message/tpl/filter/insert_config.xml b/modules/message/tpl/filter/insert_config.xml deleted file mode 100644 index 5307f8b3b..000000000 --- a/modules/message/tpl/filter/insert_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - -
- - - - - diff --git a/modules/message/tpl/js/config.js b/modules/message/tpl/js/config.js index aa304acd2..97004198d 100644 --- a/modules/message/tpl/js/config.js +++ b/modules/message/tpl/js/config.js @@ -5,41 +5,27 @@ function doGetSkinColorset(skin, type) { 'skin' : skin, 'type': type, }; - var response_tags = [ 'error', 'message', 'tpl' ]; - function on_complete(ret) { - var $container = jQuery('#colorset'); - - if(type == 'M'){ - $container = jQuery('#mcolorset'); - } - + Rhymix.ajax('message.getMessageAdminColorset', params).then(function(ret) { + var $container = type == 'M' ? $('#mcolorset') : $('#colorset'); var old_h = $container.is(':visible') ? $container.outerHeight() : 0; - if(ret.tpl == ''){ + if (ret.tpl == '') { $container.hide(); - }else{ + } else { $container.show(); - var $colorset = jQuery('#message_colorset'); - - if(type == 'M'){ - $colorset = jQuery('#message_mcolorset'); - } - + var $colorset = (type == 'M') ? $('#message_mcolorset') : $('#message_colorset'); $colorset.html(ret.tpl); } var new_h = $container.is(':visible') ? $container.outerHeight() : 0; - try { fixAdminLayoutFooter(new_h - old_h) } catch (e) {}; - } - - exec_xml('message', 'getMessageAdminColorset', params, on_complete, response_tags); + }); } -jQuery(function($){ +$(function() { doGetSkinColorset($('#skin').val()); doGetSkinColorset($('#mskin').val(), 'M'); -}); \ No newline at end of file +}); From 59f95fe09936b4dc5f8c8b2048185c3ecb1cb9dc Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Sun, 8 Feb 2026 11:08:37 +0900 Subject: [PATCH 07/11] Remove outdated filter files in admin module --- modules/admin/controllers/maintenance/Cleanup.php | 1 + modules/admin/tpl/filter/install_ftp_info.xml | 12 ------------ modules/admin/tpl/filter/install_ftp_path.xml | 9 --------- modules/admin/tpl/filter/update_env_config.xml | 9 --------- modules/admin/tpl/filter/update_lang_select.xml | 7 ------- 5 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 modules/admin/tpl/filter/install_ftp_info.xml delete mode 100644 modules/admin/tpl/filter/install_ftp_path.xml delete mode 100644 modules/admin/tpl/filter/update_env_config.xml delete mode 100644 modules/admin/tpl/filter/update_lang_select.xml diff --git a/modules/admin/controllers/maintenance/Cleanup.php b/modules/admin/controllers/maintenance/Cleanup.php index a8906dbe4..b60de76d2 100644 --- a/modules/admin/controllers/maintenance/Cleanup.php +++ b/modules/admin/controllers/maintenance/Cleanup.php @@ -369,6 +369,7 @@ class Cleanup extends Base 'modules/admin/tpl/css/admin_en.css' => 'deleted:xe', 'modules/admin/tpl/css/admin_jp.css' => 'deleted:xe', 'modules/admin/tpl/css/admin_ko.css' => 'deleted:xe', + 'modules/admin/tpl/filter/' => 'deleted:xe', 'modules/autoinstall/ruleset/' => 'deleted:xe', 'modules/autoinstall/tpl/filter/uninstall_package.xml' => 'deleted:xe', 'modules/board/board.wap.php' => 'deleted:xe', diff --git a/modules/admin/tpl/filter/install_ftp_info.xml b/modules/admin/tpl/filter/install_ftp_info.xml deleted file mode 100644 index e33c6e2fd..000000000 --- a/modules/admin/tpl/filter/install_ftp_info.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/modules/admin/tpl/filter/install_ftp_path.xml b/modules/admin/tpl/filter/install_ftp_path.xml deleted file mode 100644 index 9c7775069..000000000 --- a/modules/admin/tpl/filter/install_ftp_path.xml +++ /dev/null @@ -1,9 +0,0 @@ - -
- - - - - - -
diff --git a/modules/admin/tpl/filter/update_env_config.xml b/modules/admin/tpl/filter/update_env_config.xml deleted file mode 100644 index a95045995..000000000 --- a/modules/admin/tpl/filter/update_env_config.xml +++ /dev/null @@ -1,9 +0,0 @@ - -
- - - - - - -
diff --git a/modules/admin/tpl/filter/update_lang_select.xml b/modules/admin/tpl/filter/update_lang_select.xml deleted file mode 100644 index 7a8453f94..000000000 --- a/modules/admin/tpl/filter/update_lang_select.xml +++ /dev/null @@ -1,7 +0,0 @@ - -
- - - - - From ad1617b17cafe390ba4a084da18a7b0438dee00e Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 9 Feb 2026 21:40:56 +0900 Subject: [PATCH 08/11] Show clickable list of layout instances in "installed layout" page --- modules/layout/layout.admin.view.php | 68 ++++++++----------- modules/layout/tpl/installed_layout_list.html | 40 +++++++++-- modules/layout/tpl/sub_tab.html | 4 +- 3 files changed, 65 insertions(+), 47 deletions(-) diff --git a/modules/layout/layout.admin.view.php b/modules/layout/layout.admin.view.php index 26f532086..3551d828c 100644 --- a/modules/layout/layout.admin.view.php +++ b/modules/layout/layout.admin.view.php @@ -22,50 +22,44 @@ class LayoutAdminView extends Layout */ function dispLayoutAdminInstalledList() { - $type = Context::get('type'); - $type = ($type != 'M') ? 'P' : 'M'; + $type = Context::get('type') === 'M' ? 'M' : 'P'; - // Set a layout list - $oLayoutModel = getModel('layout'); - $layout_list = $oLayoutModel->getDownloadedLayoutList($type, true); - if(!is_array($layout_list)) + // Get installed layout list + $layout_list = LayoutModel::getDownloadedLayoutList($type, true); + if (!is_array($layout_list)) { - $layout_list = array(); + $layout_list = []; } - if($type == 'P') + // Get instance list + $columns = ['layout_srl', 'layout', 'module_srl', 'title', 'regdate']; + $instances = LayoutModel::getLayoutInstanceList(0, $type, null, $columns); + $instance_list = []; + foreach ($instances as $instance) { - // get Theme layout - $oAdminModel = getAdminModel('admin'); - $themeList = $oAdminModel->getThemeList(); - $themeLayoutList = array(); - foreach($themeList as $themeInfo) - { - if(strpos($themeInfo->layout_info->name, '.') === false) continue; - $themeLayoutList[] = $oLayoutModel->getLayoutInfo($themeInfo->layout_info->name, null, 'P'); - } - $layout_list = array_merge($layout_list, $themeLayoutList); - $layout_list[] = $oLayoutModel->getLayoutInfo('faceoff', null, 'P'); + $instance_list[$instance->layout][] = $instance; } + Context::set('instance_list', $instance_list); - $pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P'); - $mobileLayoutCount = $oLayoutModel->getInstalledLayoutCount('M'); + // Get installed layout count by type + $pcLayoutCount = LayoutModel::getInstalledLayoutCount('P'); + $mobileLayoutCount = LayoutModel::getInstalledLayoutCount('M'); Context::set('pcLayoutCount', $pcLayoutCount); Context::set('mobileLayoutCount', $mobileLayoutCount); - $this->setTemplateFile('installed_layout_list'); + // Security? $security = new Security($layout_list); $layout_list = $security->encodeHTML('..', '..author..'); - - //Security $security = new Security(); - $security->encodeHTML('layout_list..layout','layout_list..title'); - - foreach($layout_list as $no => $layout_info) + $security->encodeHTML('layout_list..layout','layout_list..title','instance_list..'); + foreach ($layout_list as $no => $layout_info) { $layout_list[$no]->description = nl2br(trim($layout_info->description)); } Context::set('layout_list', $layout_list); + + // Set template file + $this->setTemplateFile('installed_layout_list'); } /** @@ -74,19 +68,17 @@ class LayoutAdminView extends Layout */ function dispLayoutAdminAllInstanceList() { - $type = Context::get('type'); + $type = Context::get('type') === 'M' ? 'M' : 'P'; - if(!in_array($type, array('P', 'M'))) $type = 'P'; - - $oLayoutModel = getModel('layout'); - - $pcLayoutCount = $oLayoutModel->getInstalledLayoutCount('P'); - $mobileLayoutCount = $oLayoutModel->getInstalledLayoutCount('M'); + // Get installed layout count + $pcLayoutCount = LayoutModel::getInstalledLayoutCount('P'); + $mobileLayoutCount = LayoutModel::getInstalledLayoutCount('M'); Context::set('pcLayoutCount', $pcLayoutCount); Context::set('mobileLayoutCount', $mobileLayoutCount); + // Get layout instance list $columnList = array('layout_srl', 'layout', 'module_srl', 'title', 'regdate'); - $_layout_list = $oLayoutModel->getLayoutInstanceList(0, $type, null, $columnList); + $_layout_list = LayoutModel::getLayoutInstanceList(0, $type, null, $columnList); $layout_list = array(); foreach($_layout_list as $item) @@ -94,7 +86,7 @@ class LayoutAdminView extends Layout if(!$layout_list[$item->layout]) { $layout_list[$item->layout] = array(); - $layout_info = $oLayoutModel->getLayoutInfo($item->layout, null, $type); + $layout_info = LayoutModel::getLayoutInfo($item->layout, null, $type); if ($layout_info) { $layout_list[$item->layout]['title'] = $layout_info->title; @@ -108,10 +100,10 @@ class LayoutAdminView extends Layout Context::set('layout_list', $layout_list); - $this->setTemplateFile('layout_all_instance_list'); - $security = new Security(); $security->encodeHTML('layout_list..'); + + $this->setTemplateFile('layout_all_instance_list'); } /** diff --git a/modules/layout/tpl/installed_layout_list.html b/modules/layout/tpl/installed_layout_list.html index 343e51ee7..693b556d9 100644 --- a/modules/layout/tpl/installed_layout_list.html +++ b/modules/layout/tpl/installed_layout_list.html @@ -17,10 +17,11 @@ - - + + + -

{$layout->title}

+

{$layout->title}

{$layout->description}

{$lang->msg_avail_easy_update} {$lang->msg_do_you_like_update} @@ -40,9 +41,10 @@ {$layout->path} - {$lang->cmd_delete} - - + + {$lang->cmd_delete} + +

{$layout->layout}

@@ -52,7 +54,31 @@ - - {$layout->path} - + + + + + + +   + + {$instance->title} + + + + + {$lang->cmd_edit} + + 편집 + + {$lang->cmd_copy} + + + + + + + diff --git a/modules/layout/tpl/sub_tab.html b/modules/layout/tpl/sub_tab.html index 60e696410..7247e2778 100644 --- a/modules/layout/tpl/sub_tab.html +++ b/modules/layout/tpl/sub_tab.html @@ -1,6 +1,6 @@

{$lang->instance_layout} | From 1199095e7f1a94f61b85e06b57fbebcff2614cac Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 10 Feb 2026 12:23:00 +0900 Subject: [PATCH 09/11] Version 2.1.30 --- common/constants.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/constants.php b/common/constants.php index 0ecf769c8..133150cf8 100644 --- a/common/constants.php +++ b/common/constants.php @@ -3,7 +3,7 @@ /** * RX_VERSION is the version number of the Rhymix CMS. */ -define('RX_VERSION', '2.1.29'); +define('RX_VERSION', '2.1.30'); /** * RX_MICROTIME is the startup time of the current script, in microseconds since the Unix epoch. From 5834a3c18ae72e6878e0ae7444811e195cdc272c Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 11 Feb 2026 20:54:00 +0900 Subject: [PATCH 10/11] Fix fatal error in some environments when relative URL is passed to encodeIdna() or decodeIdna() #2675 --- common/framework/URL.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/framework/URL.php b/common/framework/URL.php index 6752eb99d..23e7f8f07 100644 --- a/common/framework/URL.php +++ b/common/framework/URL.php @@ -207,9 +207,13 @@ class URL */ public static function encodeIdna(string $url): string { - if (preg_match('@[:/#]@', $url)) + if (preg_match('@[:/#]@', $url) && !str_starts_with($url, '/')) { $domain = parse_url($url, \PHP_URL_HOST); + if (!$domain) + { + return $url; + } $position = strpos($url, $domain); if ($position === false) { @@ -243,9 +247,13 @@ class URL */ public static function decodeIdna(string $url): string { - if (preg_match('@[:/#]@', $url)) + if (preg_match('@[:/#]@', $url) && !str_starts_with($url, '/')) { $domain = parse_url($url, \PHP_URL_HOST); + if (!$domain) + { + return $url; + } $position = strpos($url, $domain); if ($position === false) { From c5d453a2df7b34fb4a706dbb2d5b001a31023571 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 11 Feb 2026 21:02:50 +0900 Subject: [PATCH 11/11] =?UTF-8?q?#2675=20=EB=B3=B4=EC=99=84=20=EB=B0=8F=20?= =?UTF-8?q?=EC=B5=9C=EC=A0=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/framework/URL.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/framework/URL.php b/common/framework/URL.php index 23e7f8f07..14739f9a5 100644 --- a/common/framework/URL.php +++ b/common/framework/URL.php @@ -207,7 +207,7 @@ class URL */ public static function encodeIdna(string $url): string { - if (preg_match('@[:/#]@', $url) && !str_starts_with($url, '/')) + if (!preg_match('@^/(?!/)@', $url) && preg_match('@[:/#]@', $url)) { $domain = parse_url($url, \PHP_URL_HOST); if (!$domain) @@ -247,7 +247,7 @@ class URL */ public static function decodeIdna(string $url): string { - if (preg_match('@[:/#]@', $url) && !str_starts_with($url, '/')) + if (!preg_match('@^/(?!/)@', $url) && preg_match('@[:/#]@', $url)) { $domain = parse_url($url, \PHP_URL_HOST); if (!$domain)