diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 633f22c89..e1646246c 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -114,15 +114,15 @@ class boardController extends board return new Object(-1,'msg_not_permitted'); } - if($this->module_info->protect_content == "Y" || $this->module_info->protect_update_content == 'Y') + if($this->module_info->protect_content == 'Y' || $this->module_info->protect_update_content == 'Y') { - if($oDocument->get('comment_count')>0 && $this->grant->manager==false) + if($oDocument->get('comment_count') > 0 && $this->grant->manager == false) { - return new Object(-1,'msg_protect_update_content'); + return new Object(-1, 'msg_protect_update_content'); } } - if($this->module_info->protect_document_regdate > 0 && $this->grant->manager==false) + if($this->module_info->protect_document_regdate > 0 && $this->grant->manager == false) { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { @@ -215,15 +215,15 @@ class boardController extends board $oDocumentModel = &getModel('document'); $oDocument = $oDocumentModel->getDocument($document_srl); // check protect content - if($this->module_info->protect_content == "Y" || $this->module_info->protect_delete_content == 'Y') + if($this->module_info->protect_content == 'Y' || $this->module_info->protect_delete_content == 'Y') { - if($oDocument->get('comment_count')>0 && $this->grant->manager==false) + if($oDocument->get('comment_count') > 0 && $this->grant->manager == false) { - return new Object(-1,'msg_protect_delete_content'); + return new Object(-1, 'msg_protect_delete_content'); } } - if($this->module_info->protect_document_regdate > 0 && $this->grant->manager==false) + if($this->module_info->protect_document_regdate > 0 && $this->grant->manager == false) { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { @@ -374,7 +374,7 @@ class boardController extends board } else { - if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager==false) + 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'))) { @@ -427,7 +427,7 @@ class boardController extends board } } $comment = $oCommentModel->getComment($comment_srl, $this->grant->manager); - if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager==false) + 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'))) { diff --git a/modules/board/board.view.php b/modules/board/board.view.php index a4580e3f5..015241e69 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -642,7 +642,6 @@ class boardView extends board return $this->dispBoardMessage('msg_not_permitted'); } - $oDocumentModel = getModel('document'); $logged_info = Context::get('logged_info'); @@ -695,7 +694,7 @@ class boardView extends board if($oDocument->isExists()) { - if($this->module_info->protect_document_regdate > 0 && $this->grant->manager==false) + if($this->module_info->protect_document_regdate > 0 && $this->grant->manager == false) { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { @@ -822,7 +821,7 @@ class boardView extends board return $this->setTemplateFile('input_password_form'); } - if($this->module_info->protect_document_regdate > 0 && $this->grant->manager==false) + if($this->module_info->protect_document_regdate > 0 && $this->grant->manager == false) { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) { @@ -834,7 +833,7 @@ class boardView extends board if($this->module_info->protect_content == "Y" || $this->module_info->protect_delete_content == 'Y') { - if($oDocument->get('comment_count')>0 && $this->grant->manager==false) + if($oDocument->get('comment_count')>0 && $this->grant->manager == false) { return new Object(-1,'msg_protect_delete_content'); } @@ -984,7 +983,7 @@ class boardView extends board $oMemberModel = getModel('member'); $member_info = $oMemberModel->getMemberInfoByMemberSrl($oComment->member_srl); - if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager==false) + 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'))) { @@ -1052,7 +1051,7 @@ class boardView extends board $oComment = $oCommentModel->getComment($comment_srl, $this->grant->manager); } - if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager==false) + 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'))) {