mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
게시글과 댓글을 작성 및 수정시 대기된 파일을 공개하는 방식을 변경
파일이 대기모드에서 공개할때 트리거에서 직접 호출 하는 방식으로 변경
This commit is contained in:
parent
234ad09867
commit
2cb477fd55
4 changed files with 44 additions and 100 deletions
|
|
@ -500,6 +500,8 @@ class documentController extends document
|
|||
// Remove manual member info to prevent forgery. This variable can be set by triggers only.
|
||||
unset($obj->manual_member_info);
|
||||
|
||||
$obj->uploaded_count = FileModel::getFilesCount($obj->document_srl);
|
||||
|
||||
// Call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('document.insertDocument', 'before', $obj);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -647,6 +649,14 @@ class documentController extends document
|
|||
return $update_output;
|
||||
}
|
||||
}
|
||||
|
||||
$attachOutput = getController('file')->setFilesValid($obj->document_srl, 'doc');
|
||||
if(!$attachOutput->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
|
||||
ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
|
||||
|
||||
// commit
|
||||
|
|
@ -708,6 +718,8 @@ class documentController extends document
|
|||
|
||||
// Remove manual member info to prevent forgery. This variable can be set by triggers only.
|
||||
unset($obj->manual_member_info);
|
||||
|
||||
$obj->uploaded_count = FileModel::getFilesCount($obj->document_srl);
|
||||
|
||||
// Call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('document.updateDocument', 'before', $obj);
|
||||
|
|
@ -947,6 +959,14 @@ class documentController extends document
|
|||
return $update_output;
|
||||
}
|
||||
}
|
||||
|
||||
$attachOutput = getController('file')->setFilesValid($obj->document_srl, 'doc');
|
||||
if(!$attachOutput->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
|
||||
ModuleHandler::triggerCall('document.updateDocument', 'after', $obj);
|
||||
|
||||
// commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue