if (exists $get{copy}) {
$row = {%{$row}{ qw(lang cat) }};
}
-elsif ($ENV{REQUEST_METHOD} eq 'POST') {
+elsif ($ENV{REQUEST_METHOD} eq 'POST') {{
my $replace = $row;
$row = {%post{ pairkeys @wordcols }};
$_ = length ? $_ : undef for values %{$row};
my $query = $find ? $db->update(word => $row, $find, \%res) :
$db->insert(word => $row, \%res);
$row = $query->hash;
- } or Alert("Entry could not be saved", $@);
+ } or do {
+ Alert("Entry could not be saved", $@);
+ next;
+ };
my $imgpath = "data/word/org/$row->{id}.jpg";
if (($row->{source} // '') ne ($replace->{source} // '')) {
unlink $thumbpath;
}
}
-}
+}}
else {
$row->{$_} = $get{$_} for keys %get;
}