summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-07 20:34:56 +0100
committerYorhel <git@yorhel.nl>2011-01-07 20:34:56 +0100
commit2ba5055808fbcd6bc74c03f29c44ea33cbdd3fc8 (patch)
tree2464b6a97afe4b6495fe923ff7b71d8d3c989774 /lib/VNDB
parent8523096b104153d0311d339622f2a9ddb2c1e6e2 (diff)
Bugfix: Don't allow empty edit on releases with multiple producers
Caused by an errorneous sort statement when comparing the producer values.
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/Handler/Releases.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index 06dcfd0a..4b5a3374 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -342,7 +342,7 @@ sub edit {
my $same = $rid &&
(join(',', sort @{$b4{platforms}}) eq join(',', sort @{$frm->{platforms}})) &&
- (join(',', map join(' ', @$_), sort { $a->[0] <=> $b->[0] } @$producers) eq join(',', sort map sprintf('%d %d %d',$_->{id}, $_->{developer}?1:0, $_->{publisher}?1:0), sort { $a->{id} <=> $b->{id} } @{$r->{producers}})) &&
+ (join(',', map join(' ', @$_), sort { $a->[0] <=> $b->[0] } @$producers) eq join(',', map sprintf('%d %d %d',$_->{id}, $_->{developer}?1:0, $_->{publisher}?1:0), sort { $a->{id} <=> $b->{id} } @{$r->{producers}})) &&
(join(',', sort @$new_vn) eq join(',', sort map $_->{vid}, @$vn)) &&
(join(',', sort @{$b4{languages}}) eq join(',', sort @{$frm->{languages}})) &&
!grep !/^(platforms|producers|vn|languages)$/ && $frm->{$_} ne $b4{$_}, keys %b4;