diff options
author | Yorhel <git@yorhel.nl> | 2009-01-10 10:57:14 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-01-10 10:57:14 +0100 |
commit | 614d693c4995a0de58379ce8c0780454b5f6db61 (patch) | |
tree | dabff0c265e48ef824c67b4dfd3d6e0e2b500251 /lib/VNDB/DB/VN.pm | |
parent | 08b660429d294d5347cb853de78bc285d1cd2912 (diff) |
Popularity indicator on VN pages
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r-- | lib/VNDB/DB/VN.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm index 6e6686c0..617bb523 100644 --- a/lib/VNDB/DB/VN.pm +++ b/lib/VNDB/DB/VN.pm @@ -10,7 +10,7 @@ our @EXPORT = qw|dbVNGet dbVNAdd dbVNEdit dbVNImageId dbVNCache dbScreenshotAdd # Options: id, rev, char, search, cati, cate, lang, platform, results, page, order, what -# What: extended categories anime relations screenshots relgraph changes +# What: extended categories anime relations screenshots relgraph ranking changes sub dbVNGet { my($self, %o) = @_; $o{results} ||= 10; @@ -93,6 +93,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' : (), ); my($r, $np) = $self->dbPage(\%o, q| |