|| ($new_score > $mod_params->{comment_maxscore}
&& $reason->{val} + $comment->{tweak} > 0)) {
# current score is max or min limit, so create moderate log only.
- $self->create_log($user, $comment, $reason, 0);
- return 1;
+ my $mod_id = $self->create_log($user, $comment, $reason, 0);
+ if (!$mod_id) {
+ return;
+ }
+ return $mod_id;
}
# change moderator's moderate points, token, totalmods
}
# create moderationlog (createModeratorLog)
- $self->create_log($user, $comment, $reason, 1);
+ my $mod_id = $self->create_log($user, $comment, $reason, 1);
- # TODO: send message...
+ if (!$mod_id) {
+ $self->rollback;
+ return;
+ }
+ return $mod_id;
$self->commit;
return 1;
# createModTag
# ... tag moderation is deprecated, so nothing to do
- return 1;
+ return $mod_id;
}