aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-05-05 08:15:19 +0000
committerbbaetz%acm.org <>2003-05-05 08:15:19 +0000
commit9488a8906592564ec2e7601041f3ea5484cde3cc (patch)
treeb9308d1a3dcf639d1e561ede1186ff58afc01834 /colchange.cgi
parentBug 204104 - internal error in Search.pm when searching for invalid (diff)
downloadbugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.gz
bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.tar.bz2
bugzilla-9488a8906592564ec2e7601041f3ea5484cde3cc.zip
Bug 201816 - use CGI.pm for header output
r=joel, a=justdave
Diffstat (limited to 'colchange.cgi')
-rwxr-xr-xcolchange.cgi21
1 files changed, 14 insertions, 7 deletions
diff --git a/colchange.cgi b/colchange.cgi
index 5e28a4622..2ff2f3fee 100755
--- a/colchange.cgi
+++ b/colchange.cgi
@@ -32,6 +32,8 @@ use vars qw(
$vars
);
+use Bugzilla;
+
require "CGI.pl";
ConnectToDatabase();
@@ -39,6 +41,8 @@ quietly_check_login();
GetVersionTable();
+my $cgi = Bugzilla->cgi;
+
# The master list not only says what fields are possible, but what order
# they get displayed in.
my @masterlist = ("opendate", "changeddate", "bug_severity", "priority",
@@ -87,12 +91,15 @@ if (defined $::FORM{'rememberedquery'}) {
}
my $list = join(" ", @collist);
my $urlbase = Param("urlbase");
- my $cookiepath = Param("cookiepath");
-
- print "Set-Cookie: COLUMNLIST=$list ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
- print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
- print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
- print "Content-type: text/html\n\n";
+
+ $cgi->send_cookie(-name => 'COLUMNLIST',
+ -value => $list,
+ -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
+ $cgi->send_cookie(-name => 'SPLITHEADER',
+ -value => $::FORM{'splitheader'},
+ -expires => 'Fri, 01-Jan-2038 00:00:00 GMT');
+
+ print $cgi->redirect("buglist.cgi?$::FORM{'rememberedquery'}");
$vars->{'message'} = "change_columns";
$template->process("global/message.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
@@ -111,6 +118,6 @@ $vars->{'splitheader'} = $::COOKIE{'SPLITHEADER'} ? 1 : 0;
$vars->{'buffer'} = $::buffer;
# Generate and return the UI (HTML page) from the appropriate template.
-print "Content-type: text/html\n\n";
+print $cgi->header();
$template->process("list/change-columns.html.tmpl", $vars)
|| ThrowTemplateError($template->error());