--- loncom/auth/switchserver.pm 2022/09/13 12:22:14 1.63 +++ loncom/auth/switchserver.pm 2024/10/09 15:23:35 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network # Switch Servers Handler # -# $Id: switchserver.pm,v 1.63 2022/09/13 12:22:14 raeburn Exp $ +# $Id: switchserver.pm,v 1.67 2024/10/09 15:23:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,6 +31,7 @@ package Apache::switchserver; use strict; use Apache::Constants qw(:common :remotehost); use Apache::lonnet; +use Apache::loncommon; use Digest::MD5 qw(md5_hex); use CGI::Cookie(); use Apache::lonlocal; @@ -63,7 +64,9 @@ sub do_redirect { my $start_page = &Apache::loncommon::start_page('Switching Server ...',undef, {'redirect' => [$delay,$url,'',$write_to_opener,1], - 'only_body' => $only_body,}); + 'only_body' => $only_body, + 'switchserver' => 1, + 'links_disabled' => 1,}); my $end_page = &Apache::loncommon::end_page(); $r->print($start_page.$extra_text.$end_page); unless ($env{'user.name'} eq 'public' && ($env{'user.domain'} eq 'public')) { @@ -330,6 +333,12 @@ sub handler { } if ($env{'form.origurl'}) { $info{'origurl'} = $env{'form.origurl'}; + if ($env{'form.origurl'} eq '/adm/email') { + if ($env{'request.display'} && ($env{'request.mailrecip'} eq "$env{'user.name'}:$env{'user.domain'}")) { + $info{'display'} = &escape($env{'request.display'}); + $info{'mailrecip'} = &escape($env{'request.mailrecip'}); + } + } } if ($env{'form.symb'}) { $info{'symb'} = $env{'form.symb'}; @@ -356,7 +365,7 @@ sub handler { } if ($env{'request.linkprot'}) { $info{'linkprot'} = $env{'request.linkprot'}; - foreach my $item ('linkprotuser','linkprotexit') { + foreach my $item ('linkprotuser','linkprotexit','linkprotpbid','linkprotpburl') { if ($env{'request.'.$item}) { $info{$item} = $env{'request.'.$item}; }