From: jocuri%softhome.net <>
Date: Sat, 14 Feb 2004 18:54:51 +0000 (+0000)
Subject: Patch for bug 234171; removes \%COOKIE from index.cgi; patch by Teemu Mannermaa ...
X-Git-Tag: bugzilla-2.17.7~17
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b740b9f365d75fb9765d23a042378d16a3abeb0;p=thirdparty%2Fbugzilla.git
Patch for bug 234171; removes \%COOKIE from index.cgi; patch by Teemu Mannermaa ; r=gerv; a=justdave.
---
diff --git a/index.cgi b/index.cgi
index f617965d34..bbe936207f 100755
--- a/index.cgi
+++ b/index.cgi
@@ -21,10 +21,6 @@
# Contributor(s): Jacob Steenhagen
#
-# Suppress silly "used only once" warnings
-use vars qw{ %COOKIE };
-
-
###############################################################################
# Script Initialization
###############################################################################
@@ -37,7 +33,6 @@ use lib ".";
require "CGI.pl";
use vars qw(
- $template
$vars
);
@@ -52,8 +47,7 @@ quietly_check_login('permit_anonymous');
###############################################################################
my $cgi = Bugzilla->cgi;
-
-$vars->{'username'} = $::COOKIE{'Bugzilla_login'} || '';
+my $template = Bugzilla->template;
# Return the appropriate HTTP response headers.
print $cgi->header();
diff --git a/template/en/default/index.html.tmpl b/template/en/default/index.html.tmpl
index dd35059e52..b8ea79826e 100644
--- a/template/en/default/index.html.tmpl
+++ b/template/en/default/index.html.tmpl
@@ -22,7 +22,7 @@
#%]
[%# INTERFACE:
- # username: string. The login name of the user, if any.
+ # This template has no interface.
#%]
[% PROCESS global/variables.none.tmpl %]
@@ -64,9 +64,9 @@ function addSidebar() {
Enter a new [% terms.bug %] report
Summary reports and charts
-[% IF username %]
+[% IF user.id %]
Change password or user preferences
- Logout [% username FILTER html %]
+ Logout [% user.login FILTER html %]
[% ELSE %]
Log in to an existing account
[% IF Param('createemailregexp') %]