diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index de6ef6c54..c250776fc 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -250,23 +250,15 @@ class commentController extends comment /** * Authorization of the comments - * @param int $comment_srl - * @param bool $session + * available only in the current connection of the session value * @return void */ - function addGrant($comment_srl, $session = false) + function addGrant($comment_srl) { $comment = getModel('comment')->getComment($comment_srl); if ($comment->isExists()) { - if ($session) - { - $comment->setGrantForSession(); - } - else - { - $comment->setGrant(); - } + $comment->setGrant(); } } @@ -589,7 +581,7 @@ class commentController extends comment // grant autority of the comment if(!$manual_inserted) { - $this->addGrant($obj->comment_srl, true); + $this->addGrant($obj->comment_srl); } if(!$manual_inserted) diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 39086f9c3..e3e0435d9 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -325,23 +325,16 @@ class documentController extends document /** * Grant a permisstion of the document + * Available in the current connection with session value * @param int $document_srl - * @param bool $session * @return void */ - function addGrant($document_srl, $session = false) + function addGrant($document_srl) { $oDocument = getModel('document')->getDocument($document_srl); if ($oDocument->isExists()) { - if ($session) - { - $oDocument->setGrantForSession(); - } - else - { - $oDocument->setGrant(); - } + $oDocument->setGrant(); } } @@ -537,7 +530,7 @@ class documentController extends document // return if(!$manual_inserted) { - $this->addGrant($obj->document_srl, true); + $this->addGrant($obj->document_srl); } $output->add('document_srl',$obj->document_srl); $output->add('category_srl',$obj->category_srl);