mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix module_srl not being updated for files attached to comments, when a document is moved to a different module
This commit is contained in:
parent
f6a9d49db1
commit
b213fc1968
2 changed files with 15 additions and 7 deletions
|
|
@ -1971,8 +1971,16 @@ class FileController extends File
|
|||
function triggerMoveDocument($obj)
|
||||
{
|
||||
$obj->upload_target_srls = $obj->document_srls;
|
||||
executeQuery('file.updateFileModule', $obj);
|
||||
executeQuery('file.updateFileModuleComment', $obj);
|
||||
$output = executeQuery('file.updateFileModule', $obj);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
$output = executeQuery('file.updateFileModuleComment', $obj);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
function triggerAddCopyDocument(&$obj)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<query id="updateFileModuleComment" action="update">
|
||||
<tables>
|
||||
<table name="files" />
|
||||
<table name="comments" />
|
||||
<table name="files" alias="f" />
|
||||
<table name="comments" alias="c" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="files.module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
<column name="f.module_srl" var="module_srl" filter="number" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="files.upload_target_srl" default="comments.comment_srl" />
|
||||
<condition operation="in" column="comments.document_srl" var="upload_target_srls" filter="number" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="f.upload_target_srl" default="c.comment_srl" />
|
||||
<condition operation="in" column="c.document_srl" var="upload_target_srls" filter="number" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue