From e3920cf7242fb4782f8fd296d08f27b4fca9fe74 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 23 Jan 2010 09:43:54 +0100 Subject: DB::VN: Fixed ranking bug on VN pages with a NULL popularity or rating --- lib/VNDB/DB/VN.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm index b8cc0c42..6ff74d1f 100644 --- a/lib/VNDB/DB/VN.pm +++ b/lib/VNDB/DB/VN.pm @@ -90,8 +90,8 @@ sub dbVNGet { $o{what} =~ /relgraph/ ? 'vg.svg' : (), $o{what} =~ /rating/ ? (qw|v.c_popularity v.c_rating v.c_votecount|) : (), $o{what} =~ /ranking/ ? ( - '(SELECT COUNT(*)+1 FROM vn iv WHERE iv.hidden = false AND iv.c_popularity > v.c_popularity) AS p_ranking', - '(SELECT COUNT(*)+1 FROM vn iv WHERE iv.hidden = false AND iv.c_rating > v.c_rating) AS r_ranking', + '(SELECT COUNT(*)+1 FROM vn iv WHERE iv.hidden = false AND iv.c_popularity > COALESCE(v.c_popularity, 0.0)) AS p_ranking', + '(SELECT COUNT(*)+1 FROM vn iv WHERE iv.hidden = false AND iv.c_rating > COALESCE(v.c_rating, 0.0)) AS r_ranking', ) : (), # TODO: optimize this, as it will be very slow when the selected tags match a lot of VNs (>1000) $tag_ids ? -- cgit v1.2.3 From 3f69720f88396543c34a682093f147afbef75c65 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sun, 31 Jan 2010 09:35:19 +0100 Subject: Removed #vndb link from the main menu Too many "HEY CAN YOU RECOMMEND ME .." people going around. The channel is crowded enough now. --- lib/VNDB/Util/LayoutHTML.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 084b9a4e..ba330790 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -64,9 +64,7 @@ sub _menu { a href => '/hist', mt '_menu_recent_changes'; br; a href => '/t', mt '_menu_discussion_board'; br; a href => '/d6', mt '_menu_faq'; br; - a href => '/v/rand', mt '_menu_randvn'; br; - a href => 'irc://irc.synirc.net/vndb', '#vndb'; - lit ' ('.mt('_menu_webchat').')'; + a href => '/v/rand', mt '_menu_randvn'; end; form action => '/v/all', method => 'get', id => 'search'; fieldset; @@ -149,6 +147,8 @@ sub htmlFooter { txt "vndb $self->{version} | "; a href => '/d7', mt '_footer_aboutus'; txt ' | '; + a href => 'irc://irc.synirc.net/vndb', '#vndb'; + txt ' | '; a href => "mailto:$self->{admin_email}", $self->{admin_email}; txt ' | '; a href => $self->{source_url}, mt '_footer_source'; -- cgit v1.2.3