mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-11 22:42:14 +09:00
게시글과 댓글을 작성 및 수정시 대기된 파일을 공개하는 방식을 변경
파일이 대기모드에서 공개할때 트리거에서 직접 호출 하는 방식으로 변경
This commit is contained in:
parent
234ad09867
commit
2cb477fd55
4 changed files with 44 additions and 100 deletions
|
|
@ -394,6 +394,8 @@ class commentController extends comment
|
|||
$obj->module_srl = intval($obj->module_srl);
|
||||
$obj->document_srl = intval($obj->document_srl);
|
||||
$obj->parent_srl = intval($obj->parent_srl);
|
||||
|
||||
$obj->uploaded_count = FileModel::getFilesCount($obj->comment_srl);
|
||||
|
||||
// call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('comment.insertComment', 'before', $obj);
|
||||
|
|
@ -596,6 +598,16 @@ class commentController extends comment
|
|||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, $update_document);
|
||||
}
|
||||
|
||||
if($obj->uploaded_count)
|
||||
{
|
||||
$attachOutput = getController('file')->setFilesValid($obj->comment_srl, 'com');
|
||||
if(!$attachOutput->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
}
|
||||
|
||||
// call a trigger(after)
|
||||
ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
|
||||
|
||||
|
|
@ -754,6 +766,8 @@ class commentController extends comment
|
|||
$obj->module_srl = intval($obj->module_srl);
|
||||
$obj->document_srl = intval($obj->document_srl);
|
||||
$obj->parent_srl = intval($obj->parent_srl);
|
||||
|
||||
$obj->uploaded_count = FileModel::getFilesCount($obj->comment_srl);
|
||||
|
||||
// call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('comment.updateComment', 'before', $obj);
|
||||
|
|
@ -855,6 +869,16 @@ class commentController extends comment
|
|||
return $output;
|
||||
}
|
||||
|
||||
if($obj->uploaded_count)
|
||||
{
|
||||
$attachOutput = getController('file')->setFilesValid($obj->comment_srl, 'com');
|
||||
if(!$attachOutput->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
}
|
||||
|
||||
// call a trigger (after)
|
||||
ModuleHandler::triggerCall('comment.updateComment', 'after', $obj);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue