X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/dcab2b89a7ffeabf3f5360366ea7d94ffe564f9d..ab96e204a2beec2302b1850df50f45a6e67a13c4:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index cc65716b4..978a01596 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -181,7 +181,7 @@ sub new { $self->{action} = lc $self->{action}; $self->{action} =~ s/( |-|,|\#)/_/g; - $self->{version} = "2.4.2"; + $self->{version} = "2.4.3"; $main::lxdebug->leave_sub(); @@ -690,7 +690,9 @@ sub redirect { if ($self->{callback}) { - ($script, $argv) = split(/\?/, $self->{callback}); + ($script, $argv) = split(/\?/, $self->{callback}, 2); + $script =~ s|.*/||; + $script =~ s|[^a-zA-Z_\.]||g; exec("perl", "$script", $argv); } else { @@ -1469,6 +1471,7 @@ sub add_shipto { my $shipto; my @values; + foreach my $item (qw(name department_1 department_2 street zipcode city country contact phone fax email)) { if ($self->{"shipto$item"}) { @@ -1476,6 +1479,7 @@ sub add_shipto { } push(@values, $self->{"shipto${item}"}); } + if ($shipto) { if ($self->{shipto_id}) { my $query = qq|UPDATE shipto set @@ -1504,8 +1508,10 @@ sub add_shipto { shiptocontact = ? AND shiptophone = ? AND shiptofax = ? AND - shiptoemail = ?|; - my $insert_check = selectfirst_hashref_query($self, $dbh, $query, @values); + shiptoemail = ? AND + module = ? AND + trans_id = ?|; + my $insert_check = selectfirst_hashref_query($self, $dbh, $query, @values, $module, $id); if(!$insert_check){ $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2,