summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2017-01-25 08:59:44 +0100
committerYorhel <git@yorhel.nl>2017-01-25 09:05:30 +0100
commitd937fe012a69a85911948a50fc3d1c999aff05e3 (patch)
treed54317386fc6c0686b543462aae7267cab141df4 /lib/VNDB
parenta4d90e9766d4e31f4e362a85c68ef1b1a9dad8ff (diff)
Ignore duplicate board IDs in threat edit
https://vndb.org/t2520.209
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/Handler/Discussions.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Discussions.pm b/lib/VNDB/Handler/Discussions.pm
index 381cdcf9..f7f26a5e 100644
--- a/lib/VNDB/Handler/Discussions.pm
+++ b/lib/VNDB/Handler/Discussions.pm
@@ -206,7 +206,7 @@ sub edit {
if(!$frm->{_err} && $frm->{boards}) {
for (split /[ ,]/, $frm->{boards}) {
my($ty, $id) = ($1, $2) if /^([a-z]{1,2})([0-9]*)$/;
- push @boards, [ $ty, $id ];
+ push @boards, [ $ty, $id ] if !grep $_->[0].$_->[1] eq $ty.$id, @boards;
push @{$frm->{_err}}, "Wrong board: $_" if
!$ty || !$self->{discussion_boards}{$ty}
|| $ty eq 'an' && ($id || !$self->authCan('boardmod'))