From 81adc9ffac306d61857d1cf819fc4e39ae3e0119 Mon Sep 17 00:00:00 2001 From: izuzero Date: Mon, 5 May 2014 00:12:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EB=8F=99=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=9E=91=EC=84=B1=20=EC=8B=9C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=ED=95=9C=20=ED=9A=8C=EC=9B=90=EC=97=90?= =?UTF-8?q?=EA=B2=8C=20=EC=9E=91=EC=84=B1=EB=90=9C=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=EC=9D=B4=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EB=8A=94=20=EB=AC=B8=EC=A0=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $manual_inserted 값 사용으로 작성 시 발생하는 문제 해결. --- modules/comment/comment.controller.php | 28 +++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 3ff6b2229..f0af54db0 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -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())