mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-19 19:29:56 +09:00
수동으로 댓글 작성 시 로그인한 회원에게 작성된 댓글 권한이 넘어가는 문제.
$manual_inserted 값 사용으로 작성 시 발생하는 문제 해결.
This commit is contained in:
parent
3c9894b27c
commit
81adc9ffac
1 changed files with 19 additions and 9 deletions
|
|
@ -199,18 +199,25 @@ class commentController extends comment
|
|||
// check if comment's module is using comment validation and set the publish status to 0 (false)
|
||||
// for inserting query, otherwise default is 1 (true - means comment is published)
|
||||
$using_validation = $this->isModuleUsingPublishValidation($obj->module_srl);
|
||||
if(Context::get('is_logged'))
|
||||
if($manual_inserted)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y')
|
||||
if(Context::get('is_logged'))
|
||||
{
|
||||
$is_admin = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y')
|
||||
{
|
||||
$is_admin = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_admin = FALSE;
|
||||
}
|
||||
|
||||
if(!$using_validation)
|
||||
{
|
||||
|
|
@ -441,7 +448,10 @@ class commentController extends comment
|
|||
}
|
||||
|
||||
// grant autority of the comment
|
||||
$this->addGrant($obj->comment_srl);
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$this->addGrant($obj->comment_srl);
|
||||
}
|
||||
|
||||
// call a trigger(after)
|
||||
if($output->toBool())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue