From 30caa944332fbbb9f6f5a4805f5beeee2b8a506c Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 3 Oct 2015 08:58:34 +0200 Subject: 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. --- lib/VNDB/DB/VN.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/VNDB/DB/VN.pm') 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; } -- cgit v1.2.3