summaryrefslogtreecommitdiff
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
parent8523096b104153d0311d339622f2a9ddb2c1e6e2 (diff)
Bugfix: Don't allow empty edit on releases with multiple producers
Caused by an errorneous sort statement when comparing the producer values.
-rw-r--r--ChangeLog1
-rw-r--r--lib/VNDB/Handler/Releases.pm2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ff47658a..5b561891 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
- Bugfix: Don't show NSFW screenshots on homepage with filters
- Bugfix-API: Use ~ for the get vn search filter instead of =
- Bugfix: Secondary order by title or username on vote listings
+ - Bugfix: Don't allow empty edit on releases with multiple producers
2.16 - 2011-01-02
- VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBID
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;