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

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