From 2994c1e9337b80e4e9a60cd4393fcf49595da5df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 19 Feb 2008 16:32:26 +0000 Subject: [PATCH] 2 Sicherheitschecks. --- bin/mozilla/ct.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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(); -- 2.20.1