summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-11-01 17:22:36 +0100
committerYorhel <git@yorhel.nl>2010-11-01 17:22:36 +0100
commita36e8bf7a860a7ab069b98caefad21352c70a849 (patch)
tree55398162ed8fdc5587c25afbc0174cc393daff95
parent0b16b689e87196807d60571726330207e689d107 (diff)
Properly order the relations listed on producer pages
And changed the order a bit, as suggested by ImmLff.
-rw-r--r--ChangeLog1
-rw-r--r--data/global.pl12
-rw-r--r--lib/VNDB/Handler/Producers.pm2
3 files changed, 8 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 547438f9..a8771844 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,7 @@
- Bugfix: only redirect VN search to VN page if page=1
- Bugfix: remove duplicate votes when merging tags (fixes a 500)
- Bugfix: Multi::Anime: don't crash when anidb returns an invalid or empty year
+ - Bugfix: properly order the relations listed on producer pages
2.11 - 2010-02-06
- Added Slovak to the language list
diff --git a/data/global.pl b/data/global.pl
index 5696de9a..61046bd8 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -53,12 +53,12 @@ our %S = (%S,
prod_relations => {
'old' => [ 0, 'new' ],
'new' => [ 1, 'old' ],
- 'sub' => [ 2, 'par' ],
- 'par' => [ 3, 'sub' ],
- 'imp' => [ 4, 'ipa' ],
- 'ipa' => [ 5, 'imp' ],
- 'spa' => [ 6, 'ori' ],
- 'ori' => [ 7, 'spa' ],
+ 'spa' => [ 2, 'ori' ],
+ 'ori' => [ 3, 'spa' ],
+ 'sub' => [ 4, 'par' ],
+ 'par' => [ 5, 'sub' ],
+ 'imp' => [ 6, 'ipa' ],
+ 'ipa' => [ 7, 'imp' ],
},
age_ratings => [undef, 0, 6..18],
release_types => [qw|complete partial trial|],
diff --git a/lib/VNDB/Handler/Producers.pm b/lib/VNDB/Handler/Producers.pm
index b1203dd7..bc68b88c 100644
--- a/lib/VNDB/Handler/Producers.pm
+++ b/lib/VNDB/Handler/Producers.pm
@@ -101,7 +101,7 @@ sub page {
for (sort { $a->{name} cmp $b->{name} } @{$p->{relations}});
p class => 'center';
txt "\n";
- for my $r (sort keys %rel) {
+ for my $r (sort { $self->{prod_relations}{$a}[0] <=> $self->{prod_relations}{$b}[0] } keys %rel) {
txt mt("_prodrel_$r").': ';
for (@{$rel{$r}}) {
a href => "/p$_->{id}", title => $_->{original}||$_->{name}, shorten $_->{name}, 40;