--- loncom/auth/lonlogout.pm 2011/10/22 23:53:46 1.43 +++ loncom/auth/lonlogout.pm 2013/02/08 17:11:59 1.45.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Logout Handler # -# $Id: lonlogout.pm,v 1.43 2011/10/22 23:53:46 raeburn Exp $ +# $Id: lonlogout.pm,v 1.45.2.2 2013/02/08 17:11:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -70,6 +70,9 @@ sub handler { my $lonidsdir=$r->dir_config('lonIDsDir'); &Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); unlink("$lonidsdir/$handle.id"); + if (!$Apache::lonlocal::lh) { + &Apache::lonlocal::get_language_handle($r); + } my %temp=('logout' => time); &Apache::lonnet::put('email_status',\%temp); &Apache::lonnet::log($env{'user.domain'}, @@ -89,6 +92,7 @@ sub handler { return OK if $r->header_only; # -------------------------------------------------------- Menu script and info + my $windowinfo=&Apache::lonmenu::close(); # ---------------------------------------------------------------- Get handover &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['handover']); my $switch=''; @@ -101,7 +105,8 @@ sub handler { $switch); } else { $start_page=&Apache::loncommon::start_page('Logged Out',undef, - {'no_nav_bar' => 1,}); + {'no_inline_link' => 1, + 'no_nav_bar' => 1,}); $relogmessage.='

'.&mt('Goodbye').'

' .'

'.&mt('Thank you for using LON-CAPA.').'

'; @@ -117,11 +122,21 @@ sub handler { $login_url = $domdefaults{'portal_def'}; } else { my $checkloginvia = 1; - my ($lonhost,$server,$path) = + my ($lonhost,$server,$path,$isredirect) = &Apache::lonnet::choose_server($domain,$checkloginvia); if ($server && $lonhost) { $login_url = $Apache::lonnet::protocol{$lonhost}. '://'.$server.$path; + if (($path eq '') && (!$isredirect)) { + my $serverhomeID = + &Apache::lonnet::get_server_homeID($server); + my $serverhomedom = + &Apache::lonnet::host_domain($serverhomeID); + if ($serverhomedom ne $domain) { + $path = '/adm/login'; + $login_url .= $path; + } + } if ($path eq '/adm/login' && $domain ne '') { $login_url .= '?domain='.$domain; } @@ -165,6 +180,7 @@ Due to security reasons in new web brows # --------------------------------------------------------------- Screen Output $r->print(<