mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #1827 unnecessary use of $is_admin when getting document or comment
This commit is contained in:
parent
42442aeef7
commit
97f28141ae
3 changed files with 10 additions and 10 deletions
|
|
@ -118,7 +118,7 @@ class boardController extends board
|
|||
}
|
||||
|
||||
// Update if the document already exists.
|
||||
$oDocument = DocumentModel::getDocument($obj->document_srl, $this->grant->manager);
|
||||
$oDocument = DocumentModel::getDocument($obj->document_srl);
|
||||
if($oDocument->isExists())
|
||||
{
|
||||
if(!$oDocument->isGranted())
|
||||
|
|
@ -462,7 +462,7 @@ class boardController extends board
|
|||
}
|
||||
else
|
||||
{
|
||||
$comment = CommentModel::getComment($obj->comment_srl, $this->grant->manager);
|
||||
$comment = CommentModel::getComment($obj->comment_srl);
|
||||
if($this->module_info->protect_update_comment === 'Y' && $this->grant->manager == false)
|
||||
{
|
||||
$childs = CommentModel::getChildComments($obj->comment_srl);
|
||||
|
|
@ -562,7 +562,7 @@ class boardController extends board
|
|||
$instant_delete = Context::get('instant_delete');
|
||||
}
|
||||
|
||||
$comment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
||||
$comment = CommentModel::getComment($comment_srl);
|
||||
if (!$comment || !$comment->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
|
|
|
|||
|
|
@ -838,7 +838,7 @@ class boardView extends board
|
|||
|
||||
// GET parameter document_srl from request
|
||||
$document_srl = Context::get('document_srl');
|
||||
$oDocument = DocumentModel::getDocument(0, $this->grant->manager);
|
||||
$oDocument = DocumentModel::getDocument(0);
|
||||
$oDocument->setDocument($document_srl);
|
||||
|
||||
$savedDoc = ($oDocument->get('module_srl') == $oDocument->get('member_srl'));
|
||||
|
|
@ -1078,7 +1078,7 @@ class boardView extends board
|
|||
}
|
||||
|
||||
// get the comment
|
||||
$oSourceComment = CommentModel::getComment($parent_srl, $this->grant->manager);
|
||||
$oSourceComment = CommentModel::getComment($parent_srl);
|
||||
|
||||
// if the comment is not existed, opoup an error message
|
||||
if(!$oSourceComment->isExists())
|
||||
|
|
@ -1098,7 +1098,7 @@ class boardView extends board
|
|||
}
|
||||
|
||||
// get the comment information
|
||||
$oComment = CommentModel::getComment();
|
||||
$oComment = CommentModel::getComment(0);
|
||||
$oComment->add('parent_srl', $parent_srl);
|
||||
$oComment->add('document_srl', $oSourceComment->get('document_srl'));
|
||||
|
||||
|
|
@ -1138,7 +1138,7 @@ class boardView extends board
|
|||
}
|
||||
|
||||
// get comment information
|
||||
$oComment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
||||
$oComment = CommentModel::getComment($comment_srl);
|
||||
|
||||
// if the comment is not exited, alert an error message
|
||||
if(!$oComment->isExists())
|
||||
|
|
@ -1205,7 +1205,7 @@ class boardView extends board
|
|||
// if the comment exists, then get the comment information
|
||||
if($comment_srl)
|
||||
{
|
||||
$oComment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
||||
$oComment = CommentModel::getComment($comment_srl);
|
||||
}
|
||||
|
||||
if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class documentView extends document
|
|||
$document_srl = Context::get('document_srl');
|
||||
|
||||
// Creates an object for displaying the selected document
|
||||
$oDocument = DocumentModel::getDocument($document_srl, $this->grant->manager);
|
||||
$oDocument = DocumentModel::getDocument($document_srl);
|
||||
if(!$oDocument->isExists()) throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
// Check permissions
|
||||
if(!$oDocument->isAccessible()) throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
|
|
@ -232,7 +232,7 @@ class documentView extends document
|
|||
}
|
||||
|
||||
// Creates an object for displaying the selected document
|
||||
$oDocument = DocumentModel::getDocument($document_srl, $this->grant->manager, FALSE);
|
||||
$oDocument = DocumentModel::getDocument($document_srl, false, false);
|
||||
if(!$oDocument->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue