mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Fix #1341 also calculate point difference accurately when new file is uploaded to a comment
This commit is contained in:
parent
367635d21b
commit
a43f0368ec
2 changed files with 26 additions and 13 deletions
|
|
@ -598,7 +598,7 @@ class commentController extends comment
|
|||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, $update_document);
|
||||
}
|
||||
|
||||
if($obj->uploaded_count)
|
||||
if($obj->uploaded_count > 0)
|
||||
{
|
||||
$attachOutput = getController('file')->setFilesValid($obj->comment_srl, 'com');
|
||||
if(!$attachOutput->toBool())
|
||||
|
|
@ -606,6 +606,11 @@ class commentController extends comment
|
|||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
$obj->updated_file_count = $attachOutput->get('updated_file_count');
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->updated_file_count = 0;
|
||||
}
|
||||
|
||||
// call a trigger(after)
|
||||
|
|
@ -869,7 +874,7 @@ class commentController extends comment
|
|||
return $output;
|
||||
}
|
||||
|
||||
if($obj->uploaded_count)
|
||||
if($obj->uploaded_count > 0)
|
||||
{
|
||||
$attachOutput = getController('file')->setFilesValid($obj->comment_srl, 'com');
|
||||
if(!$attachOutput->toBool())
|
||||
|
|
@ -877,6 +882,11 @@ class commentController extends comment
|
|||
$oDB->rollback();
|
||||
return $attachOutput;
|
||||
}
|
||||
$obj->updated_file_count = $attachOutput->get('updated_file_count');
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->updated_file_count = 0;
|
||||
}
|
||||
|
||||
// call a trigger (after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue