]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 126791 - templatise relogin.cgi
authorgerv%gerv.net <>
Sun, 24 Feb 2002 16:54:14 +0000 (16:54 +0000)
committergerv%gerv.net <>
Sun, 24 Feb 2002 16:54:14 +0000 (16:54 +0000)
relogin.cgi

index a0ec4f105fcc3f77eca8db9e30aa1ba3f3e25841..03670158dc7f6a4a2c4d445143aef2377d9da4a6 100755 (executable)
 # Rights Reserved.
 #
 # Contributor(s): Terry Weissman <terry@mozilla.org>
+#                 Gervase Markham <gerv@gerv.net>
 
 use diagnostics;
 use strict;
 
 use vars %::COOKIE;
+use vars qw($template $vars);
 
 use lib qw(.);
 
@@ -51,23 +53,24 @@ if ($::userid) {
 my $cookiepath = Param("cookiepath");
 print "Set-Cookie: Bugzilla_login= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
 Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00:00:00 GMT
-Content-type: text/html
-
 ";
 
 # delete the cookie before dumping the header so that it shows the user
 # as logged out if %commandmenu% is in the header
 delete $::COOKIE{"Bugzilla_login"};
 
-PutHeader ("Relogin");
-
-print "<B>Your login has been forgotten</B>.</P>
-The cookie that was remembering your login is now gone.  The next time you
-do an action that requires a login, you will be prompted for it.
-<p>
-";
-
-PutFooter();
+    $vars->{'title'} = "Logged Out";
+    $vars->{'message'} = "<b>Your login has been forgotten</b>.
+                          The cookie that was remembering your login is 
+                          now gone. You will be prompted for a login the 
+                          next time it is required.";
+    $vars->{'url'} = "query.cgi?GoAheadAndLogIn=1";
+    $vars->{'link'} = "Log in again here";
+    
+    print "Content-Type: text/html\n\n";
+    $template->process("global/message.html.tmpl", $vars)
+      || DisplayError("Template process failed: " . $template->error())
+      && exit;
 
 exit;