summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/CommonHTML.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-10 15:16:05 +0200
committerYorhel <git@yorhel.nl>2009-05-10 15:16:05 +0200
commitdca26d601127d6c3e5761bce4e60b9f5ef4f3d1d (patch)
tree992f2a718034ed13c074ba226581b63b0e65281f /lib/VNDB/Util/CommonHTML.pm
parentd3e270d6987cfe696ee2c2e25bb344f242f53a1e (diff)
Use ceil() when determining average vote status thingy on /v+
Diffstat (limited to 'lib/VNDB/Util/CommonHTML.pm')
-rw-r--r--lib/VNDB/Util/CommonHTML.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index 744216c1..b9405941 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -8,6 +8,7 @@ use Exporter 'import';
use Algorithm::Diff::XS 'compact_diff';
use VNDB::Func;
use Encode 'encode_utf8', 'decode_utf8';
+use POSIX 'ceil';
our @EXPORT = qw|
htmlMainTabs htmlDenied htmlHiddenMessage htmlBrowse htmlBrowseNavigate
@@ -419,7 +420,7 @@ sub htmlVoteStats {
end; end;
tfoot; Tr;
td colspan => 2, sprintf '%d vote%s total, average %.2f%s', $count, $count != 1 ? 's' : '', $total/$count,
- $type eq 'v' ? ' ('.$self->{votes}[sprintf '%.0f', $total/$count-1].')' : '';
+ $type eq 'v' ? ' ('.$self->{votes}[ceil($total/$count-1)].')' : '';
end; end;
for (reverse 0..$#$stats) {
Tr;