]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 234171; removes \%COOKIE from index.cgi; patch by Teemu Mannermaa ...
authorjocuri%softhome.net <>
Sat, 14 Feb 2004 18:54:51 +0000 (18:54 +0000)
committerjocuri%softhome.net <>
Sat, 14 Feb 2004 18:54:51 +0000 (18:54 +0000)
index.cgi
template/en/default/index.html.tmpl

index f617965d3470fc610a501c32356c0f55952fac0d..bbe936207f077b12cd5837d01cb961d1551d9a34 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
 # Contributor(s): Jacob Steenhagen <jake@bugzilla.org>
 #
 
-# 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();
index dd35059e52f81010ac38838703a61d41c63c7b05..b8ea79826eea37377383334f47847f82ab957f25 100644 (file)
@@ -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() {
   <a href="enter_bug.cgi">Enter a new [% terms.bug %] report</a><br>
   <a href="report.cgi">Summary reports and charts</a><br>
   </p><p>
-[% IF username %]
+[% IF user.id %]
   <a href="userprefs.cgi">Change password or user preferences</a><br>
-  <a href="relogin.cgi">Logout [% username FILTER html %]</a><br>
+  <a href="relogin.cgi">Logout [% user.login FILTER html %]</a><br>
 [% ELSE %]
   <a href="query.cgi?GoAheadAndLogIn=1">Log in to an existing account</a><br>
   [% IF Param('createemailregexp') %]