version 1.177, 2018/12/26 20:10:21
|
version 1.178, 2018/12/27 18:14:38
|
Line 852 sub check_loginvia {
|
Line 852 sub check_loginvia {
|
|
|
sub redirect_page {
|
sub redirect_page {
|
my ($desthost,$path,$linkprot) = @_;
|
my ($desthost,$path,$linkprot) = @_;
|
|
my $hostname = &Apache::lonnet::hostname($desthost);
|
my $protocol = $Apache::lonnet::protocol{$desthost};
|
my $protocol = $Apache::lonnet::protocol{$desthost};
|
$protocol = 'http' if ($protocol ne 'https');
|
$protocol = 'http' if ($protocol ne 'https');
|
unless ($path =~ m{^/}) {
|
unless ($path =~ m{^/}) {
|
$path = '/'.$path;
|
$path = '/'.$path;
|
}
|
}
|
my $url = $protocol.'://'.&Apache::lonnet::hostname($desthost).$path;
|
my $url = $protocol.'://'.$hostname.$path;
|
if ($env{'form.firsturl'} ne '') {
|
if ($env{'form.firsturl'} ne '') {
|
$url .='?firsturl='.$env{'form.firsturl'};
|
$url .='?firsturl='.$env{'form.firsturl'};
|
}
|
}
|