Merge branch 'rhymix:master' into master

This commit is contained in:
Lastorder 2026-02-12 14:03:54 +09:00 committed by GitHub
commit aba6016986
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 224 additions and 194 deletions

View file

@ -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.

View file

@ -207,9 +207,13 @@ class URL
*/
public static function encodeIdna(string $url): string
{
if (preg_match('@[:/#]@', $url))
if (!preg_match('@^/(?!/)@', $url) && preg_match('@[:/#]@', $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) && preg_match('@[:/#]@', $url))
{
$domain = parse_url($url, \PHP_URL_HOST);
if (!$domain)
{
return $url;
}
$position = strpos($url, $domain);
if ($position === false)
{

View file

@ -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',
@ -441,6 +442,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',

View file

@ -1,12 +0,0 @@
<filter name="install_ftp_info" module="install" act="procInstallAdminSaveFTPInfo" >
<form>
<node target="ftp_user" required="true" />
<node target="ftp_port" required="false" filter="number" />
<node target="ftp_root_path" required="true" />
<node target="sftp" />
</form>
<response callback_func="completeMessage">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -1,9 +0,0 @@
<filter name="install_ftp_path" module="install" act="procInstallAdminSaveFTPPath" confirm_msg_code="confirm_submit">
<form>
<node target="ftp_root_path" required="true" />
</form>
<response callback_func="completeFtpPath">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -1,9 +0,0 @@
<filter name="update_env_config" module="install" act="procInstallAdminSaveTimeZone" >
<form>
<node target="time_zone" required="true" />
</form>
<response callback_func="completeMessage">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -1,7 +0,0 @@
<filter name="update_lang_select" module="install" act="procInstallAdminSaveLangSelected" >
<form />
<response callback_func="completeMessage">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -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();

View file

@ -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';

View file

@ -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));
}
}
}
@ -594,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
@ -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));
}
}
@ -674,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

View file

@ -879,15 +879,16 @@ 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')
{
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));
}
}
@ -1102,17 +1103,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')
{
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');
return $this->dispBoardMessage(sprintf(lang('msg_protect_delete_content'), $comment_limit));
}
}
@ -1297,19 +1299,20 @@ 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)
{
$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));
}
}
@ -1384,20 +1387,21 @@ 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);
}
}
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));
}
}

View file

@ -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.<br>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.<br>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.';

View file

@ -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 = '업데이트 로그가 기록되어 있지 않은 게시글입니다.';

View file

@ -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 = '回复里有他人回复的时候无法删除。';

View file

@ -362,17 +362,52 @@
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_content}</label>
<div class="x_controls">
<label class="x_inline" for="protect_delete_content"><input type="checkbox" name="protect_delete_content" id="protect_delete_content" value="Y" checked="checked"|cond="$module_info->protect_delete_content == 'Y'" /> {$lang->cmd_delete}</label>
<label class="x_inline" for="protect_update_content"><input type="checkbox" name="protect_update_content" id="protect_update_content" value="Y" checked="checked"|cond="$module_info->protect_update_content == 'Y'" /> {$lang->cmd_modify}</label>
<p>{$lang->about_protect_content}</p>
<label for="protect_update_content">
<input type="checkbox" name="protect_update_content" id="protect_update_content" value="Y" checked="checked"|cond="$module_info->protect_update_content == 'Y'" />
{array_first(explode('%d', $lang->about_protect_content_update))}
<input type="number" min="0" name="protect_update_content_limit" value="{$module_info->protect_update_content_limit ?? 1}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_content_update))}
</label>
<label for="protect_delete_content">
<input type="checkbox" name="protect_delete_content" id="protect_delete_content" value="Y" checked="checked"|cond="$module_info->protect_delete_content == 'Y'" />
{array_first(explode('%d', $lang->about_protect_content_delete))}
<input type="number" min="0" name="protect_delete_content_limit" value="{$module_info->protect_delete_content_limit ?? 1}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_content_delete))}
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_comment}</label>
<div class="x_controls">
<label class="x_inline" for="protect_delete_comment"><input type="checkbox" name="protect_delete_comment" id="protect_delete_comment" value="Y" checked="checked"|cond="$module_info->protect_delete_comment == 'Y'" /> {$lang->cmd_delete}</label>
<label class="x_inline" for="protect_update_comment"><input type="checkbox" name="protect_update_comment" id="protect_update_comment" value="Y" checked="checked"|cond="$module_info->protect_update_comment == 'Y'" /> {$lang->cmd_modify}</label>
<p>{$lang->about_protect_comment}</p>
<label for="protect_update_comment">
<input type="checkbox" name="protect_update_comment" id="protect_update_comment" value="Y" checked="checked"|cond="$module_info->protect_update_comment == 'Y'" />
{array_first(explode('%d', $lang->about_protect_comment_update))}
<input type="number" min="0" name="protect_update_comment_limit" value="{$module_info->protect_update_comment_limit ?? 1}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_comment_update))}
</label>
<label for="protect_delete_comment">
<input type="checkbox" name="protect_delete_comment" id="protect_delete_comment" value="Y" checked="checked"|cond="$module_info->protect_delete_comment == 'Y'" />
{array_first(explode('%d', $lang->about_protect_comment_delete))}
<input type="number" min="0" name="protect_delete_comment_limit" value="{$module_info->protect_delete_comment_limit ?? 1}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_comment_delete))}
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_regdate}</label>
<div class="x_controls">
<label for="protect_document_regdate">
<input type="checkbox" name="protect_document_regdate" id="protect_document_regdate" value="Y" checked="checked"|cond="!empty($module_info->protect_document_regdate)" />
{array_first(explode('%d', $lang->about_protect_document_regdate))}
<input type="number" min="0" name="protect_document_regdate_limit" value="{$module_info->protect_document_regdate ?? ''}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_document_regdate))}
</label>
<label for="protect_comment_regdate">
<input type="checkbox" name="protect_comment_regdate" id="protect_comment_regdate" value="Y" checked="checked"|cond="!empty($module_info->protect_comment_regdate)" />
{array_first(explode('%d', $lang->about_protect_comment_regdate))}
<input type="number" min="0" name="protect_comment_regdate_limit" value="{$module_info->protect_comment_regdate ?? ''}" style="width:50px" />
{array_last(explode('%d', $lang->about_protect_comment_regdate))}
</label>
</div>
</div>
<!--@if($this->user->isAdmin())-->
@ -385,14 +420,6 @@
</div>
</div>
<!--@end-->
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_regdate}</label>
<div class="x_controls">
{$lang->document} : <input type="number" min="0" name="protect_document_regdate" id="protect_document_regdate" value="{$module_info->protect_document_regdate}" />
{$lang->comment} : <input type="number" min="0" name="protect_comment_regdate" id="protect_comment_regdate" value="{$module_info->protect_comment_regdate}" />
<p>{$lang->about_protect_regdate}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="comment_delete_message">{$lang->comment_delete_message}</label>
<div class="x_controls">

View file

@ -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');
}
}

View file

@ -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');
}
}
@ -1566,13 +1566,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';
}
}

View file

@ -1,7 +1,7 @@
<?php
$lang->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';

View file

@ -1,7 +1,7 @@
<?php
$lang->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 = '등록키';

View file

@ -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 = "";

View file

@ -1,8 +1,8 @@
<!--// 다음 우편번호 API -->
<!--// 다음/카카오 우편번호 API -->
<!--// https://github.com/daumPostcode/QnA -->
<!--// HEADER -->
<load target="//t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js" />
<load target="./css/default.css" />
<load target="http://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js" cond="!\RX_SSL" />
<load target="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js" cond="\RX_SSL" />
<load target="./js/daumapi.js" />
<!--// BODY -->

View file

@ -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');
}
/**

View file

@ -17,10 +17,11 @@
</tr>
</thead>
<tbody>
<tr loop="$layout_list => $key, $layout">
<block cond="$layout->title">
<!--@foreach($layout_list as $layout)-->
<tr>
<!--@if($layout->title)-->
<td class="title">
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->title}</a></p>
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}" style="font-weight:bold;color:#000">{$layout->title}</a></p>
<p>{$layout->description}</p>
<p cond="$layout->need_update == 'Y'" class="update">
{$lang->msg_avail_easy_update} <a href="{$layout->update_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->msg_do_you_like_update}</a>
@ -40,9 +41,10 @@
</block>
</td>
<td class="rx_detail_marks">{$layout->path}</td>
<td class="nowr rx_detail_marks"><a cond="$layout->remove_url" class="x_btn x_btn-link" href="{$layout->remove_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a></td>
</block>
<block cond="!$layout->title">
<td class="nowr rx_detail_marks">
<a cond="$layout->remove_url" class="x_btn x_btn-link" href="{$layout->remove_url}&amp;return_url={urlencode(getRequestUriByServerEnviroment())}">{$lang->cmd_delete}</a>
</td>
<!--@else-->
<td class="title">
<p><a href="{getUrl('act', 'dispLayoutAdminInstanceList', 'type', $type, 'layout', $layout->layout)}">{$layout->layout}</a></p>
<p cond="$layout->need_update == 'Y'" class="update">
@ -52,7 +54,31 @@
<td>-</td>
<td>-</td>
<td class="rx_detail_marks">{$layout->path}</td>
</block>
<td class="rx_detail_marks"></td>
<!--@endif-->
</tr>
<!--@if(isset($instance_list[$layout->layout]))-->
<!--@foreach($instance_list[$layout->layout] as $instance)-->
<tr>
<td colspan="2" style="padding-left:20px;">
<i class="xi-reply-l" style="transform:rotate(180deg);"></i> &nbsp;
<a href="{getUrl(['module' => 'admin', 'act' => 'dispLayoutAdminModify', 'layout_srl' => $instance->layout_srl])}">
{$instance->title}
</a>
</td>
<td>
<!--@if($instance->is_edited)-->
<a href="{getUrl(['module' => 'admin', 'act' => 'dispLayoutAdminEdit', 'layout_srl' => $instance->layout_srl])}">{$lang->cmd_edit}</a>
<!--@else-->
<span style="color:#999">편집</span>
<!--@endif-->
<a href="{getUrl(['module' => 'layout', 'act' => 'dispLayoutAdminCopyLayout', 'layout_srl' => $instance->layout_srl])}" onclick="popopen(this.href);return false;" title="{$lang->cmd_copy}">{$lang->cmd_copy}</a></td>
</td>
<td class="rx_detail_marks"></td>
<td class="rx_detail_marks"></td>
</tr>
<!--@endforeach-->
<!--@endif-->
<!--@endforeach-->
</tbody>
</table>

View file

@ -1,6 +1,6 @@
<ul class="x_nav x_nav-tabs">
<li class="x_active"|cond="$type != 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'P')}">PC({$pcLayoutCount})</a></li>
<li class="x_active"|cond="$type == 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'M')}">Mobile({$mobileLayoutCount})</a></li>
<li class="x_active"|cond="$type != 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'P')}">PC ({$pcLayoutCount})</a></li>
<li class="x_active"|cond="$type == 'M'"><a href="{getUrl('act', 'dispLayoutAdminInstalledList', 'type', 'M')}">Mobile ({$mobileLayoutCount})</a></li>
</ul>
<div>
<a class="active"|cond="$act == 'dispLayoutAdminAllInstanceList'" href="{getUrl('act', 'dispLayoutAdminAllInstanceList', 'layout_srl', '')}">{$lang->instance_layout}</a> <i>|</i>

View file

@ -1,7 +0,0 @@
<filter name="insert_config" module="message" act="procMessageAdminInsertConfig" confirm_msg_code="confirm_submit">
<form />
<response callback_func="completeMessage">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -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');
});
});