From 0a1aef1e7e502df51b9d85b6ac6428f255f58b41 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 1 Sep 2022 12:49:13 +0200 Subject: kontakt: drop silently unless at least of tur/antal/tid supplied --- kontakt.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kontakt.cgi') diff --git a/kontakt.cgi b/kontakt.cgi index f0fd79c..a860a9d 100755 --- a/kontakt.cgi +++ b/kontakt.cgi @@ -106,11 +106,12 @@ if ($form->submitted) { # Abuse subject to add additional headers # $mail_subject .= "\n" . 'Content-Type: text/plain; charset="ISO-8859-1";'; # $mail_subject .= "\n" . 'Content-Transfer-Encoding: 8bit'; + my $field = $form->fields; $form->mailresults( to => $mail_to, from => $mail_from, subject => "$mail_subject", - ); + ) unless ( !!$field->{tur} + !!$field->{antal} + !!$field->{tid} < 2 ); if ($confirm) { $infostring .= "\n

Følgende informationer er blevet sendt:"; $form->{opt}{messages}{form_confirm_text} = "$infostring"; -- cgit v1.2.3