Diff for /loncom/auth/lonlogout.pm between versions 1.38.8.1 and 1.45.2.1

version 1.38.8.1, 2009/12/06 19:41:34 version 1.45.2.1, 2012/08/06 23:14:04
Line 90  sub handler { Line 90  sub handler {
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
   
     my $windowinfo=&Apache::lonmenu::close();      my $windowinfo=&Apache::lonmenu::close();
     $windowinfo.=&Apache::lonnavmaps::close();  
 # ---------------------------------------------------------------- Get handover  # ---------------------------------------------------------------- Get handover
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['handover']);      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['handover']);
     my $switch='';      my $switch='';
Line 109  sub handler { Line 108  sub handler {
         $relogmessage.='<h1>'.&mt('Goodbye').'</h1>'          $relogmessage.='<h1>'.&mt('Goodbye').'</h1>'
                       .'<p>'.&mt('Thank you for using LON-CAPA.').'</p>';                        .'<p>'.&mt('Thank you for using LON-CAPA.').'</p>';
   
           my $domain = $env{'user.domain'};
  if (!$env{'request.sso.norelogin'}) {   if (!$env{'request.sso.norelogin'}) {
     my $relogin_server;      my ($relogin_server,$login_url);
     if ($env{'request.sso.reloginserver'}) {      if ($env{'request.sso.reloginserver'}) {
  $relogin_server = $env{'request.sso.reloginserver'};   $relogin_server = $env{'request.sso.reloginserver'};
     }      } else {
     my $login_url = $relogin_server.'/adm/'.                   my %domdefaults = &Apache::lonnet::get_domain_defaults($domain);
  ($env{'request.sso.login'} ? 'roles': 'login');                   if ($domdefaults{'portal_def'}) {
                        $login_url = $domdefaults{'portal_def'};
                    } else {
                        my $checkloginvia = 1;
                        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;
                            }
                        }
                    }
               }
               if ($login_url eq '') {
           $login_url = $relogin_server.'/adm/'.
       ($env{'request.sso.login'} ? 'roles': 'login?domain='.$domain);
               }
             $relogmessage.='<p>'.&mt('You have been successfully logged out.').' '              $relogmessage.='<p>'.&mt('You have been successfully logged out.').' '
                           .&mt('You can [_1]close this window[_2] now.'                            .&mt('You can [_1]close this window[_2] now.'
                               ,'','') # ,'<a href="javascript:self.close();">','</a>')                                ,'','') # ,'<a href="javascript:self.close();">','</a>')
Line 130  sub handler { Line 157  sub handler {
 Due to security reasons in new web browsers a window could only be closed with java script, if this window has also been opend with javascript. This is not done here which means that in most cases the close link will not work. Unless we find another solution, this link should not be offered. (Stefan Bisitz, 2008-08-01)  Due to security reasons in new web browsers a window could only be closed with java script, if this window has also been opend with javascript. This is not done here which means that in most cases the close link will not work. Unless we find another solution, this link should not be offered. (Stefan Bisitz, 2008-08-01)
   
 =cut  =cut
               $relogmessage.='<p>'.&mt('[_1]Log in again[_2]'
             $relogmessage .= '<p>'.&mt('[_1]Log in again[_2]'                                ,'<a href="'.$login_url.'">','</a>')
                               ,'<a href="'.$login_url.'?domain='.$env{'user.domain'}.'">','</a>').                            .'</p>';
                              ('&nbsp;'x6).&mt('[_1]Return to WebCenter front page[_2]',  
                                '<a href="/">','</a>')  
                              .'</p>';  
   
   
         }          }
  my $domain = $env{'user.domain'};  
         if ($env{'request.sso.login'}          if ($env{'request.sso.login'}
     && defined($r->dir_config("lonSSOUserLogoutMessageFile_$domain"))) {      && defined($r->dir_config("lonSSOUserLogoutMessageFile_$domain"))) {
     open(my $fh,$r->dir_config("lonSSOUserLogoutMessageFile_$domain"));      open(my $fh,$r->dir_config("lonSSOUserLogoutMessageFile_$domain"));

Removed from v.1.38.8.1  
changed lines
  Added in v.1.45.2.1


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>