mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix fatal error if dispBoardDeleteComment is called without comment_srl
This commit is contained in:
parent
1d079e3194
commit
13ad81da5d
1 changed files with 24 additions and 16 deletions
|
|
@ -983,11 +983,15 @@ class BoardView extends Board
|
|||
{
|
||||
$oDocument = DocumentModel::getDocument($document_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
// if the document is not existed, then back to the board content page
|
||||
// if the document does not exist
|
||||
if(!$oDocument || !$oDocument->isExists())
|
||||
{
|
||||
return $this->dispBoardContent();
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
||||
// if the document is not granted, then back to the password input form
|
||||
|
|
@ -1023,7 +1027,7 @@ class BoardView extends Board
|
|||
}
|
||||
}
|
||||
|
||||
Context::set('oDocument',$oDocument);
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
/**
|
||||
* add JS filters
|
||||
|
|
@ -1231,6 +1235,23 @@ class BoardView extends Board
|
|||
{
|
||||
$oComment = CommentModel::getComment($comment_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
// if the comment does not exist
|
||||
if(!$oComment || !$oComment->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
||||
// if the comment is not granted, then back to the password input form
|
||||
if(!$oComment->isGranted())
|
||||
{
|
||||
Context::set('document_srl', $oComment->get('document_srl'));
|
||||
return $this->setTemplateFile('input_password_form');
|
||||
}
|
||||
|
||||
if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false)
|
||||
{
|
||||
|
|
@ -1261,19 +1282,6 @@ class BoardView extends Board
|
|||
}
|
||||
}
|
||||
|
||||
// if the comment is not existed, then back to the board content page
|
||||
if(!$oComment->isExists() )
|
||||
{
|
||||
return $this->dispBoardContent();
|
||||
}
|
||||
|
||||
// if the comment is not granted, then back to the password input form
|
||||
if(!$oComment->isGranted())
|
||||
{
|
||||
Context::set('document_srl', $oComment->get('document_srl'));
|
||||
return $this->setTemplateFile('input_password_form');
|
||||
}
|
||||
|
||||
Context::set('oComment',$oComment);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue