summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Tags.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-11-27 11:31:40 +0100
committerYorhel <git@yorhel.nl>2009-11-27 11:31:40 +0100
commit4b6421198ab810375b6d152f0eb581a01c1017b5 (patch)
tree9bf004947aed339bf0eee58964e754ccb8176da6 /lib/VNDB/DB/Tags.pm
parent8448e6a074a5b5899db99567b625506fc57689c9 (diff)
Changed VN score on tags pages to display plain averages
For three reasons: - Speed tag_vn_calc() is now more than 10 times faster (granted, it could have been a lot faster even with the bayesian rating, but whatever) - Consistency with the tag scores displayed on the VN pages (which are raw averages as well) - It didn't always make sense
Diffstat (limited to 'lib/VNDB/DB/Tags.pm')
-rw-r--r--lib/VNDB/DB/Tags.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VNDB/DB/Tags.pm b/lib/VNDB/DB/Tags.pm
index 8cf4ee29..16b39a5b 100644
--- a/lib/VNDB/DB/Tags.pm
+++ b/lib/VNDB/DB/Tags.pm
@@ -200,21 +200,21 @@ sub dbTagStats {
# Argument: %options->{ tag order page results maxspoil }
sub dbTagVNs {
my($self, %o) = @_;
- $o{order} ||= 'tb.rating DESC';
+ $o{order} ||= 'th.rating DESC';
$o{page} ||= 1;
$o{results} ||= 10;
my %where = (
'tag = ?' => $o{tag},
defined $o{maxspoil} ? (
- 'tb.spoiler <= ?' => $o{maxspoil} ) : (),
+ 'th.spoiler <= ?' => $o{maxspoil} ) : (),
'v.hidden = FALSE' => 1,
);
my($r, $np) = $self->dbPage(\%o, q|
- SELECT tb.tag, tb.vid, tb.users, tb.rating, tb.spoiler, vr.title, vr.original, v.c_languages, v.c_released, v.c_platforms, v.c_popularity
- FROM tags_vn_bayesian tb
- JOIN vn v ON v.id = tb.vid
+ SELECT th.tag, th.vid, th.users, th.rating, th.spoiler, vr.title, vr.original, v.c_languages, v.c_released, v.c_platforms, v.c_popularity
+ FROM tags_vn_inherit th
+ JOIN vn v ON v.id = th.vid
JOIN vn_rev vr ON vr.id = v.latest
!W
ORDER BY !s|,