diff options
author | Yorhel <git@yorhel.nl> | 2011-04-30 16:22:28 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-04-30 16:22:28 +0200 |
commit | 28cf4e0e79487d82a325238105f670713b20bf85 (patch) | |
tree | fcade078ff3b00941be750dcb0e536772a98d274 | |
parent | 53d155d44e60c2fa56a5d8a9ab861454eb655a5e (diff) |
affiliates: Improved default version info
-rw-r--r-- | lib/VNDB/Handler/Affiliates.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Affiliates.pm b/lib/VNDB/Handler/Affiliates.pm index e5e05d0f..ac46c68d 100644 --- a/lib/VNDB/Handler/Affiliates.pm +++ b/lib/VNDB/Handler/Affiliates.pm @@ -54,7 +54,7 @@ sub list { nextpage => 0, options => {p=>0, %$f}, pageurl => '', - sorturl => "/affiliates?a=$f->{a}", + sorturl => "/affiliates?a=$f->{a};h=$f->{h}", header => [ ['Release', 'rel'], ['Version'], diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index 42f1343a..44a63db8 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -420,12 +420,17 @@ sub _affiliate_links { ul; for my $link (@$links) { my $f = $self->{affiliates}[$link->{affiliate}]; + + my $rel = $r{$link->{rid}}; + my $plat = grep($_ eq 'win', @{$rel->{platforms}}) ? '' : ' '.join(' and ', map $en->maketext("_plat_$_"), @{$rel->{platforms}}); + my $version = join(', ', map $en->maketext("_lang_$_"), @{$rel->{languages}}).$plat.' version'; + li; a rel => 'nofollow', href => $f->{link_format} ? $f->{link_format}->($link->{url}) : $link->{url}; use utf8; txt '→ '; txt $link->{version} - || ($f->{default_version} && $f->{default_version}->($self, $link, $r{$link->{rid}})) - || join(', ', map $en->maketext("_lang_$_"), @{$r{$link->{rid}}{languages}}).' version'; + || ($f->{default_version} && $f->{default_version}->($self, $link, $rel)) + || $version; txt ' '; acronym class => 'pricenote', title => sprintf('Last updated: %s.', $en->age($link->{lastfetch})), "for $link->{price}*" if $link->{price}; |