#197 설정값을 분리

This commit is contained in:
qw5414 2016-02-10 13:15:14 +09:00
parent 8f9011a235
commit 77a998c10a
3 changed files with 10 additions and 7 deletions

View file

@ -306,12 +306,12 @@ class boardController extends board
else
{
$comment = $oCommentModel->getComment($obj->comment_srl, $this->grant->manager);
if($this->module_info->protect_comment === 'Y' && $this->grant->manager == false)
if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false)
{
$childs = $oCommentModel->getChildComments($obj->comment_srl);
if (count($childs) > 0)
if(count($childs) > 0)
{
return new Object(-1, 'msg_board_protect_comment');
return new Object(-1, 'msg_board_update_protect_comment');
}
}
}
@ -384,12 +384,12 @@ class boardController extends board
$oCommentModel = getModel('comment');
if($this->module_info->protect_comment === 'Y' && $this->grant->manager==false)
if($this->module_info->protect_delete_comment === 'Y' && $this->grant->manager == false)
{
$childs = $oCommentModel->getChildComments($comment_srl);
if(count($childs) > 0)
{
return new Object(-1, 'msg_board_protect_comment');
return new Object(-1, 'msg_board_delete_protect_comment');
}
}

View file

@ -46,4 +46,5 @@ $lang->about_protect_content = '작성된 글에 댓글이 작성된 경우 글
$lang->msg_protect_content = '댓글이 작성된 게시물의 글을 수정 또는 삭제 할 수 없습니다.';
$lang->msg_admin_document_no_modify = '최고관리자의 게시물을 수정할 권한이 없습니다.';
$lang->msg_admin_comment_no_modify = '최고관리자의 댓글을 수정할 권한이 없습니다.';
$lang->msg_board_protect_comment = '댓글이 작성된 댓글의 글을 수정 또는 삭제할 수 없습니다.';
$lang->msg_board_delete_protect_comment = '댓글이 작성된 댓글의 글을 삭제할 수 없습니다.';
$lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.';

View file

@ -208,7 +208,9 @@
<div class="x_control-group">
<label class="x_control-label">{$lang->protect_comment}</label>
<div class="x_controls">
<label class="x_inline" for="protect_comment"><input type="checkbox" name="protect_comment" id="protect_comment" value="Y" checked="checked"|cond="$module_info->protect_comment == 'Y'" /> {$lang->about_protect_comment}</label>
<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>
</div>
</div>
<div class="x_control-group">