@@ 1103-1112 (lines=10) @@ | ||
1100 | $oDB->begin(); |
|
1101 | ||
1102 | // update the number of votes |
|
1103 | if($point < 0) |
|
1104 | { |
|
1105 | $args->blamed_count = $oComment->get('blamed_count') + $point; |
|
1106 | $output = executeQuery('comment.updateBlamedCount', $args); |
|
1107 | } |
|
1108 | else |
|
1109 | { |
|
1110 | $args->voted_count = $oComment->get('voted_count') + $point; |
|
1111 | $output = executeQuery('comment.updateVotedCount', $args); |
|
1112 | } |
|
1113 | ||
1114 | // leave logs |
|
1115 | $args->point = $point; |
@@ 1128-1137 (lines=10) @@ | ||
1125 | $oDB->begin(); |
|
1126 | ||
1127 | // Update the voted count |
|
1128 | if($point < 0) |
|
1129 | { |
|
1130 | $args->blamed_count = $oDocument->get('blamed_count') + $point; |
|
1131 | $output = executeQuery('document.updateBlamedCount', $args); |
|
1132 | } |
|
1133 | else |
|
1134 | { |
|
1135 | $args->voted_count = $oDocument->get('voted_count') + $point; |
|
1136 | $output = executeQuery('document.updateVotedCount', $args); |
|
1137 | } |
|
1138 | if(!$output->toBool()) return $output; |
|
1139 | // Leave logs |
|
1140 | $args->point = $point; |