From: Sven Schöling Date: Tue, 19 Feb 2008 16:32:26 +0000 (+0000) Subject: 2 Sicherheitschecks. X-Git-Tag: release-2.6.0beta1~231 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2994c1e9337b80e4e9a60cd4393fcf49595da5df;p=kivitendo-erp.git 2 Sicherheitschecks. --- diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 2a6aaca2b..5c76ae36f 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -599,9 +599,12 @@ sub delete_shipto { $auth->assert('customer_vendor_edit'); - CT->delete_shipto($form->{shipto_id}); + CT->get_shipto(\%myconfig, \%$form); - @$form{ grep /^shipto/, keys %$form } = undef; + unless ($form->{shiptoused}) { + CT->delete_shipto($form->{shipto_id}); + @$form{ grep /^shipto/, keys %$form } = undef; + } edit(); @@ -613,9 +616,12 @@ sub delete_contact { $auth->assert('customer_vendor_edit'); - CT->delete_shipto($form->{cp_id}); + CT->get_contact(\%myconfig, \%$form); - @$form{ grep /^cp_/, keys %$form } = undef; + unless ($form->{cp_used}) { + CT->delete_shipto($form->{cp_id}); + @$form{ grep /^cp_/, keys %$form } = undef; + } edit();