Diff for /loncom/auth/switchserver.pm between versions 1.20 and 1.22

version 1.20, 2007/11/15 01:16:32 version 1.22, 2009/04/14 23:52:07
Line 73  sub handler { Line 73  sub handler {
     if (!defined($handle)) { return FORBIDDEN; }      if (!defined($handle)) { return FORBIDDEN; }
   
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
     ['otherserver','role']);   ['otherserver','role','origurl','symb']);
   
     my $switch_to=&Apache::lonnet::hostname($env{'form.otherserver'});      my $switch_to=&Apache::lonnet::hostname($env{'form.otherserver'});
     if (! $env{'form.otherserver'}) {      if (! $env{'form.otherserver'}) {
Line 132  sub handler { Line 132  sub handler {
       'username' => $env{'user.name'},        'username' => $env{'user.name'},
       'role'     => $env{'form.role'},        'role'     => $env{'form.role'},
       'server'   => $r->dir_config('lonHostID'));        'server'   => $r->dir_config('lonHostID'));
       if ($env{'form.origurl'}) {
           $info{'origurl'} = $env{'form.origurl'};
       }
       if ($env{'form.symb'}) {
           $info{'symb'} = $env{'form.symb'};
       }
     if ($env{'request.sso.login'}) {      if ($env{'request.sso.login'}) {
  $info{'sso.login'} = $env{'request.sso.login'};   $info{'sso.login'} = $env{'request.sso.login'};
     }      }
Line 141  sub handler { Line 147  sub handler {
     my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'});      my $token = &Apache::lonnet::tmpput(\%info,$env{'form.otherserver'});
     my $url ='http://'.$switch_to.'/adm/login?'.      my $url ='http://'.$switch_to.'/adm/login?'.
  'domain='.$env{'user.domain'}.   'domain='.$env{'user.domain'}.
  '&username='.$env{'user.name'}.   '&username='.$env{'user.name'}.
  '&token='.$token;   '&token='.$token;
 # --------------------------------------------------------------- Screen Output  # --------------------------------------------------------------- Screen Output
     &Apache::lonnet::flushcourselogs();      &Apache::lonnet::flushcourselogs();
     return &do_redirect($r,$url,0,$windowinfo);      return &do_redirect($r,$url,0,$windowinfo);

Removed from v.1.20  
changed lines
  Added in v.1.22


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