--- loncom/auth/lonlogin.pm 2015/03/06 22:32:39 1.158.2.1 +++ loncom/auth/lonlogin.pm 2014/10/04 02:59:32 1.159 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.158.2.1 2015/03/06 22:32:39 raeburn Exp $ +# $Id: lonlogin.pm,v 1.159 2014/10/04 02:59:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,7 +113,10 @@ sub handler { my %sessiondata; if ($env{'form.iptoken'}) { %sessiondata = &Apache::lonnet::tmpget($env{'form.iptoken'}); - my $delete = &Apache::lonnet::tmpdel($env{'form.token'}); + unless ($sessiondata{'sessionserver'}) { + my $delete = &Apache::lonnet::tmpdel($env{'form.iptoken'}); + delete($env{'form.iptoken'}); + } } # ----------------------------------------------------------- Process Interface $env{'form.interface'}=~s/\W//g; @@ -222,6 +225,12 @@ sub handler { } $tokenextras .= '&symb='.&escape($env{'form.symb'}); } + if ($env{'form.iptoken'}) { + if (!$tokenextras) { + $tokenextras = '&&'; + } + $tokenextras .= '&iptoken='.&escape($env{'form.iptoken'}); + } my $logtoken=Apache::lonnet::reply( 'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras, $lonhost); @@ -378,29 +387,6 @@ ENDSCRIPT alink => "$alink", onload => 'javascript:enableInput();',); - my %defaultdomconf = &Apache::loncommon::get_domainconf($defdom); - my $headextra = $defaultdomconf{$defdom.'.login.headtag_'.$lonhost}; - my $headextra_exempt = $defaultdomconf{$domain.'.login.headtag_exempt_'.$lonhost}; - if ($headextra) { - my $omitextra; - if ($headextra_exempt ne '') { - my @exempt = split(',',$headextra_exempt); - my $ip = $ENV{'REMOTE_ADDR'}; - if (grep(/^\Q$ip\E$/,@exempt)) { - $omitextra = 1; - } - } - unless ($omitextra) { - my $confname = $defdom.'-domainconfig'; - if ($headextra =~ m{^\Q/res/$defdom/$confname/login/headtag/$lonhost/\E}) { - my $extra = &Apache::lonnet::getfile(&Apache::lonnet::filelocation("",$headextra)); - unless ($extra eq '-1') { - $js .= "\n".$extra."\n"; - } - } - } - } - $r->print(&Apache::loncommon::start_page('The LearningOnline Network with CAPA Login',$js, { 'redirect' => [$expire,'/adm/roles'], 'add_entries' => \%add_entries,