From 9488a8906592564ec2e7601041f3ea5484cde3cc Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Mon, 5 May 2003 08:15:19 +0000 Subject: Bug 201816 - use CGI.pm for header output r=joel, a=justdave --- move.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'move.pl') diff --git a/move.pl b/move.pl index fa34e758d..34c06f720 100755 --- a/move.pl +++ b/move.pl @@ -31,6 +31,7 @@ require "CGI.pl"; use vars qw($template $userid %COOKIE); use Bug; +use Bugzilla; use Bugzilla::BugMail; $::lockcount = 0; @@ -44,6 +45,8 @@ unless ( Param("move-enabled") ) { ConnectToDatabase(); confirm_login(); +my $cgi = Bugzilla->cgi; + sub Log { my ($str) = (@_); Lock(); @@ -59,7 +62,7 @@ sub Lock { open(LOCKFID, ">>data/maillock") || die "Can't open data/maillock: $!"; my $val = flock(LOCKFID,2); if (!$val) { # '2' is magic 'exclusive lock' const. - print "Content-type: text/html\n\n"; + print $cgi->header(); print "Lock failed: $val\n"; } chmod 0666, "data/maillock"; @@ -76,7 +79,7 @@ sub Unlock { } if ( !defined $::FORM{'buglist'} ) { - print "Content-type: text/html\n\n"; + print $cgi->header(); PutHeader("Move Bugs"); print "Move bugs either from the bug display page or perform a "; print "query and change several bugs at once.\n"; @@ -91,7 +94,7 @@ my $movers = Param("movers"); $movers =~ s/\s?,\s?/|/g; $movers =~ s/@/\@/g; unless ($exporter =~ /($movers)/) { - print "Content-type: text/html\n\n"; + print $cgi->header(); PutHeader("Move Bugs"); print "

You do not have permission to move bugs

\n"; PutFooter(); -- cgit v1.2.3-24-g4f1b