mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix #1999 missing rollback on query error during updateVotedCount
This commit is contained in:
parent
c2bf7d65ce
commit
9bc69abe0b
1 changed files with 10 additions and 2 deletions
|
|
@ -1793,7 +1793,11 @@ class documentController extends document
|
|||
$args->voted_count = $trigger_obj->after_point;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
}
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Leave in the session information
|
||||
$_SESSION['voted_document'][$document_srl] = $trigger_obj->point;
|
||||
|
|
@ -1801,7 +1805,11 @@ class documentController extends document
|
|||
// Leave logs
|
||||
$args->point = $trigger_obj->point;
|
||||
$output = executeQuery('document.insertDocumentVotedLog', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Call a trigger (after)
|
||||
ModuleHandler::triggerCall('document.updateVotedCount', 'after', $trigger_obj);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue