mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-24 12:52:19 +09:00
글쓴이에게는 무조건 세션 권한 부여
비회원 글쓰기 후 본문 페이지에서 비밀번호 인증을 받아야 하기 때문에 매우 번거로움.
This commit is contained in:
parent
5e9273d5f3
commit
2840740286
2 changed files with 23 additions and 8 deletions
|
|
@ -250,15 +250,23 @@ class commentController extends comment
|
|||
|
||||
/**
|
||||
* Authorization of the comments
|
||||
* available only in the current connection of the session value
|
||||
* @param int $comment_srl
|
||||
* @param bool $session
|
||||
* @return void
|
||||
*/
|
||||
function addGrant($comment_srl)
|
||||
function addGrant($comment_srl, $session = false)
|
||||
{
|
||||
$comment = getModel('comment')->getComment($comment_srl);
|
||||
if ($comment->isExists())
|
||||
{
|
||||
$comment->setGrant();
|
||||
if ($session)
|
||||
{
|
||||
$comment->setGrantForSession();
|
||||
}
|
||||
else
|
||||
{
|
||||
$comment->setGrant();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -581,7 +589,7 @@ class commentController extends comment
|
|||
// grant autority of the comment
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$this->addGrant($obj->comment_srl);
|
||||
$this->addGrant($obj->comment_srl, true);
|
||||
}
|
||||
|
||||
if(!$manual_inserted)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue