--- loncom/auth/lonlogin.pm 2023/02/03 23:09:30 1.205 +++ loncom/auth/lonlogin.pm 2023/11/21 19:52:18 1.207 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.205 2023/02/03 23:09:30 raeburn Exp $ +# $Id: lonlogin.pm,v 1.207 2023/11/21 19:52:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,7 +68,7 @@ sub handler { $env{'form.ltoken'} = $info{'ltoken'}; } elsif ($info{'linkprot'}) { $env{'form.linkprot'} = $info{'linkprot'}; - foreach my $item ('linkprotuser','linkprotexit') { + foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { if ($info{$item} ne '') { $env{'form.'.$item} = $info{$item}; } @@ -199,7 +199,7 @@ sub handler { $link_info{'ltoken'} = $env{'form.ltoken'}; } elsif ($env{'form.linkprot'}) { $link_info{'linkprot'} = $env{'form.linkprot'}; - foreach my $item ('linkprotuser','linkprotexit') { + foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { if ($env{'form.'.$item} ne '') { $link_info{$item} = $env{'form.'.$item}; } @@ -277,7 +277,7 @@ sub handler { $dest = &HTML::Entities::encode($env{'form.firsturl'},'\'"<>&'); } if (($env{'form.ltoken'}) || ($env{'form.linkprot'})) { - my ($linkprot,$linkprotuser,$linkprotexit); + my ($linkprot,$linkprotuser,$linkprotexit,$linkprotpbid,$linkprotpburl); if ($env{'form.ltoken'}) { my %info = &Apache::lonnet::tmpget($env{'form.ltoken'}); $linkprot = $info{'linkprot'}; @@ -287,10 +287,18 @@ sub handler { if ($info{'linkprotexit'} ne '') { $linkprotexit = $info{'linkprotexit'}; } + if ($info{'linkprotpbid'} ne '') { + $linkprotpbid = $info{'linkprotpbid'}; + } + if ($info{'linkprotpburl'} ne '') { + $linkprotpburl = $info{'linkprotpburl'}; + } } else { $linkprot = $env{'form.linkprot'}; $linkprotuser = $env{'form.linkprotuser'}; $linkprotexit = $env{'form.linkprotexit'}; + $linkprotpbid = $env{'form.linkprotpbid'}; + $linkprotpburl = $env{'form.linkprotpburl'}; } if ($linkprot) { my ($linkprotector,$deeplink) = split(/:/,$linkprot,2); @@ -302,7 +310,9 @@ sub handler { linkprot => $linkprot, linkprotuser => $linkprotuser, linkprotexit => $linkprotexit, - ); + linkprotpbid => $linkprotpbid, + linkprotpburl => $linkprotpburl, + ); if ($env{'form.ltoken'}) { my $delete = &Apache::lonnet::tmpdel($env{'form.ltoken'}); } @@ -493,7 +503,8 @@ sub handler { # -------------------------------------------------------- Store away log token my ($tokenextras,$tokentype,$linkprot_for_login); - my @names = ('role','symb','iptoken','ltoken','linkprotuser','linkprotexit','linkprot','linkkey','display'); + my @names = ('role','symb','iptoken','ltoken','linkprotuser','linkprotexit', + 'linkprot','linkkey','display','linkprotpbid','linkprotpburl'); foreach my $name (@names) { if ($env{'form.'.$name} ne '') { if ($name eq 'ltoken') { @@ -501,7 +512,7 @@ sub handler { if ($info{'linkprot'}) { $linkprot_for_login = $info{'linkprot'}; $tokenextras .= '&linkprot='.&escape($info{'linkprot'}); - foreach my $item ('linkprotuser','linkprotexit') { + foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { if ($info{$item}) { $tokenextras .= '&'.$item.'='.&escape($info{$item}); } @@ -1260,7 +1271,7 @@ sub redirect_page { $args->{'only_body'} = 1; } elsif ($env{'form.linkprot'}) { $link_info{'linkprot'} = $env{'form.linkprot'}; - foreach my $item ('linkprotuser','linkprotexit') { + foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { if ($env{'form.'.$item}) { $link_info{$item} = $env{'form.'.$item}; } @@ -1300,7 +1311,7 @@ sub redirect_page { } $url .= $querystring; } - $args->{'redirect'} = [0,$url]; + $args->{'redirect'} = [0,$url,'','',1]; my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef,$args); my $end_page = &Apache::loncommon::end_page(); return $start_page.$end_page;