summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-05-10 15:28:31 +0200
committerYorhel <git@yorhel.nl>2009-05-10 15:28:31 +0200
commite35a92e7e1fb024d6490616329a74ae880b8ee9b (patch)
tree681ff56f7a36b71538ce4fbb9b74bb711959fe10
parent9909b50b1973d02717c89d4e42b274909d59a0ac (diff)
Fixed off-by-one error in popularity ranking on v+
-rw-r--r--lib/VNDB/DB/VN.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index dcd1d06a..4f04edd5 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -95,7 +95,7 @@ sub dbVNGet {
$o{what} =~ /changes/ ? (
qw|c.added c.requester c.comments v.latest u.username c.rev c.causedby|) : (),
$o{what} =~ /relgraph/ ? 'rg.cmap' : (),
- $o{what} =~ /ranking/ ? '(SELECT COUNT(*) FROM vn iv WHERE iv.hidden = false AND iv.c_popularity > v.c_popularity) AS ranking' : (),
+ $o{what} =~ /ranking/ ? '(SELECT COUNT(*)+1 FROM vn iv WHERE iv.hidden = false AND iv.c_popularity > v.c_popularity) AS ranking' : (),
);
my($r, $np) = $self->dbPage(\%o, q|