diff options
author | Yorhel <git@yorhel.nl> | 2009-05-03 08:34:52 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-05-03 08:34:52 +0200 |
commit | 8c4beccc25641f72ad3312324734b6f243ea9fd8 (patch) | |
tree | 6e6cd5f81ac538008783edd8440bc446c40885a9 | |
parent | 7b9660dd23ee854d5dfbc12632d98503ffd06b21 (diff) |
Don't count hidden VNs in ranking + first rank considered with shared place
Fixes:
For newly added vns popularity status is something like
Ranked #1709 out of 1692 with a score of 0.00.
-rw-r--r-- | lib/VNDB/DB/VN.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm index 368657fc..1e9fc74f 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.c_popularity >= v.c_popularity) AS ranking' : (), + $o{what} =~ /ranking/ ? '(SELECT COUNT(*) FROM vn iv WHERE iv.hidden = false AND iv.c_popularity > v.c_popularity) AS ranking' : (), ); my($r, $np) = $self->dbPage(\%o, q| |