summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/VN.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2015-10-03 08:58:34 +0200
committerYorhel <git@yorhel.nl>2015-10-03 08:58:34 +0200
commit30caa944332fbbb9f6f5a4805f5beeee2b8a506c (patch)
tree9d3ffa6f316cb5f3723bf764172d8f49098e4d96 /lib/VNDB/DB/VN.pm
parent4cebc475aa4cd045d16e91616f148454d06d3c7d (diff)
Rewrote screenshot uploader to support multiple files + use json
This might have broken the screenshot uploader on some crappy browsers, but it's much cleaner than the old iframe hack. The ability to upload multiple files in one go is also very convenient.
Diffstat (limited to 'lib/VNDB/DB/VN.pm')
-rw-r--r--lib/VNDB/DB/VN.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index d3b37315..54c410b5 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -239,7 +239,7 @@ sub dbVNRevisionInsert {
if($o->{screenshots}) {
$self->dbExec('DELETE FROM edit_vn_screenshots');
my $q = join ',', map '(?, ?, ?)', @{$o->{screenshots}};
- my @val = map +($_->[0], $_->[1]?1:0, $_->[2]), @{$o->{screenshots}};
+ my @val = map +($_->{id}, $_->{nsfw}?1:0, $_->{rid}), @{$o->{screenshots}};
$self->dbExec("INSERT INTO edit_vn_screenshots (scr, nsfw, rid) VALUES $q", @val) if @val;
}