summaryrefslogtreecommitdiff
path: root/shift.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'shift.cgi')
-rwxr-xr-xshift.cgi10
1 files changed, 6 insertions, 4 deletions
diff --git a/shift.cgi b/shift.cgi
index 295eda8..6738b82 100755
--- a/shift.cgi
+++ b/shift.cgi
@@ -2,7 +2,7 @@
#!/usr/bin/perl -Tw
# (Text::Template can't do -T, but no user input is used dangerously)
#
-# $Id: shift.cgi,v 1.4 2000-09-23 18:10:54 ivan Exp $
+# $Id: shift.cgi,v 1.5 2002-07-10 01:08:49 ivan Exp $
#
# Copyright (C) 2000 Adam Gould
# Copyright (C) 2000 Michal Migurski
@@ -40,7 +40,7 @@ END
use strict;
use vars qw( $template_file $data_directory $mail_smtpserver $mail_from
$mail_subject @mail_cc $mail_footer
- $cgi $template %shifthash %warning @messages );
+ $cgi $template %shifthash %warning @messages $magic );
use subs qw( form inputbox );
use Fcntl ":flock";
use CGI 2.15;
@@ -202,13 +202,15 @@ sub get_data {
# subroutines for the template
sub form {
- $cgi->start_form;
+ $magic = defined $cgi->param('__MAGIC') ? $cgi->param('__MAGIC') : '';
+ $cgi->delete_all();
+ $cgi->start_form();
}
sub inputbox {
my $field = shift;
return $shifthash{$field} || " "
- if defined $cgi->param('__MAGIC') && $cgi->param('__MAGIC') eq 'print';
+ if $magic eq 'print';
$shifthash{$field}='' unless defined $shifthash{$field};
$warning{$field}='' unless defined $warning{$field};
#"$field ".