[LON-CAPA-cvs] cvs: modules /raeburn/register Logout.pm
raeburn
lon-capa-cvs@mail.lon-capa.org
Wed, 21 Mar 2007 22:31:37 -0000
raeburn Wed Mar 21 18:31:37 2007 EDT
Modified files:
/modules/raeburn/register Logout.pm
Log:
Cookie name now set correctly on logout.
Use registration.css
Index: modules/raeburn/register/Logout.pm
diff -u modules/raeburn/register/Logout.pm:1.3 modules/raeburn/register/Logout.pm:1.4
--- modules/raeburn/register/Logout.pm:1.3 Fri Feb 3 20:28:46 2006
+++ modules/raeburn/register/Logout.pm Wed Mar 21 18:31:37 2007
@@ -9,11 +9,10 @@
sub handler {
my $r = shift;
my %input = ();
- &Apache::LON::processform::getitems($r,\%input);
+ &Apache::LON::processform::getitems($r->args,\%input);
- my $newurl = $input{'portal'};
+ my $newurl = $input{'portal'}[0];
- my $auth_type = $r->auth_type;
my $auth_name = $r->dir_config('authcookie');
my $cookie; # cookie to send to client
@@ -57,12 +56,11 @@
$dbh->do("DELETE FROM loncapa_sessions WHERE id = '$sess_id'");
}
my $auth_cookie = new CGI::Cookie (
- -name => $r->auth_name,
- -value => { uri => $r->uri },
+ -name => $auth_name,
+ -value => { uri => '/' },
-path => '/'
);
- $r->headers_out->{'Set-cookie'} = $auth_cookie;
- my %headers_out = $r->headers_out;
+ $r->headers_out->set('Set-cookie' => $auth_cookie);
$r->content_type('text/html');
$r->send_http_header;
&print_html($r,$newurl);
@@ -82,6 +80,7 @@
<title>LON-CAPA support system logout</title>
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Refresh" CONTENT="10; url=$newurl" />
+<link type="text/css" rel="stylesheet" href="/css/registration.css">
END
&main_box(\$output);
$output .= <<"END";
@@ -145,27 +144,27 @@
-->
</style>
</head>
-<body bgcolor="#ffffff" $loadmsg topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
+<body $loadmsg>
<div align="center">
<br />
<br />
</div>
<br>
<div align="center">
-<table width="720" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF99">
+<table width="720" border="0" cellpadding="0" cellspacing="0" class="LC_register">
<tr>
<td align="left" valign="top" width="12" nowrap><img name="login_r1_c1" src="/images/login/lclogin_r1_c1.gif" width="12" height="10" border="0" alt=""></td>
<td width="698" nowrap valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="450" bgcolor="#FFFF99">
+ <table border="0" cellpadding="0" cellspacing="0" width="450" class="LC_register">
<tr>
<td width="15" rowspan="2" nowrap><spacer type="block" width="15"></td>
- <td width="266" align="left" nowrap><img src="/images/login/lonlogos.gif" width="74" height="50" align="left"><br /><font size="-1">The Learning<i>Online</i> Network with CAPA</font></td>
+ <td width="266" align="left" nowrap><img src="/images/login/lonlogos.gif" width="74" height="50" align="left"><br /><nobr><font size="-1">The Learning<i>Online</i> Network with CAPA</font></nobr></td>
<td width="15" nowrap><spacer type="block" width="15"></td>
<td width="130" align="left" nowrap><img src="/images/login/student.jpg" rowspan="2" width="130" height="85"></td>
<td width="24" rowspan="2" nowrap><spacer type="block" width="20"></td>
</tr>
<tr>
- <td colspan="5" bgcolor="#FFFF99" width="450" height="8"><img src="/images/login/login_red_horiz.gif" width="450" height="8"></td>
+ <td colspan="5" width="450" height="8" class="LC_darker"></td>
</tr>
</table>
END
@@ -177,7 +176,7 @@
</td>
</tr>
</table>
-<table width="720" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF99">
+<table width="720" border="0" cellpadding="0" cellspacing="0" class="LC_register">
<tr>
<td align="left" valign="bottom" width="10"><img src="/images/login/lclogin_r9_c1.gif" width="12" height="10" border="0" alt=""></td>
<td width="696" nowrap><spacer type="block" width="696"></td>