diff options
author | Yorhel <git@yorhel.nl> | 2009-11-14 19:04:44 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-14 19:07:55 +0100 |
commit | 7791d0236a9bcd85ea3542360b0c68a8492a909e (patch) | |
tree | 0777720f6fa5d79a68fcf1e410dd6aa454ea3f79 /lib/VNDB/Handler/VNBrowse.pm | |
parent | 2c6f62c89c93dbb5ec757c11f2af38534f2c760a (diff) |
SQL: Allow NULL for vn.c_popularity
Sorting from least to most popular VN make sense now, you won't have to
wade through those entries without any vote at all.
Diffstat (limited to 'lib/VNDB/Handler/VNBrowse.pm')
-rw-r--r-- | lib/VNDB/Handler/VNBrowse.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm index 3aaa1e25..dbe80ac1 100644 --- a/lib/VNDB/Handler/VNBrowse.pm +++ b/lib/VNDB/Handler/VNBrowse.pm @@ -123,9 +123,9 @@ sub list { td class => 'tc4'; lit $self->{l10n}->datestr($l->{c_released}); end; - td class => 'tc5', sprintf '%.2f', $l->{c_popularity}*100; + td class => 'tc5', sprintf '%.2f', ($l->{c_popularity}||0)*100; td class => 'tc6'; - txt sprintf '%.2f', $l->{c_rating}; + txt sprintf '%.2f', $l->{c_rating}||0; b class => 'grayedout', sprintf ' (%d)', $l->{c_votecount}; end; end; |