Diff for /loncom/auth/lonlogin.pm between versions 1.121 and 1.123

version 1.121, 2009/05/16 01:19:29 version 1.123, 2009/07/22 20:24:07
Line 46  sub handler { Line 46  sub handler {
  (join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'},   (join('&',$ENV{'QUERY_STRING'},$env{'request.querystring'},
       $ENV{'REDIRECT_QUERY_STRING'}),        $ENV{'REDIRECT_QUERY_STRING'}),
  ['interface','username','domain','firsturl','localpath','localres',   ['interface','username','domain','firsturl','localpath','localres',
   'token']);    'token','role','symb']);
     if (!defined($env{'form.firsturl'})) {      if (!defined($env{'form.firsturl'})) {
         &Apache::lonacc::get_posted_cgi($r,['firsturl']);          &Apache::lonacc::get_posted_cgi($r,['firsturl']);
     }      }
Line 170  sub handler { Line 170  sub handler {
     if ($uextkey>2147483647) { $uextkey-=4294967296; }      if ($uextkey>2147483647) { $uextkey-=4294967296; }
   
 # -------------------------------------------------------- Store away log token  # -------------------------------------------------------- Store away log token
       my $tokenextras;
       if ($env{'form.role'}) {
           $tokenextras = '&role='.&escape($env{'form.role'});
       }
       if ($env{'form.symb'}) {
           $tokenextras .= '&symb='.&escape($env{'form.symb'});
       }
     my $logtoken=Apache::lonnet::reply(      my $logtoken=Apache::lonnet::reply(
        'tmpput:'.$ukey.$lkey.'&'.$firsturl,         'tmpput:'.$ukey.$lkey.'&'.$firsturl.$tokenextras,
        $lonhost);         $lonhost);
   
 # ------------------- If we cannot talk to ourselves, we are in serious trouble  # ------------------- If we cannot talk to ourselves, we are in serious trouble
Line 264  my $now=time; Line 271  my $now=time;
 my $js = (<<ENDSCRIPT);  my $js = (<<ENDSCRIPT);
   
 <script type="text/javascript" language="JavaScript">  <script type="text/javascript" language="JavaScript">
   // <![CDATA[
 function send()  function send()
 {  {
 this.document.server.elements.uname.value  this.document.server.elements.uname.value
Line 289  this.document.client.elements.upass$now. Line 297  this.document.client.elements.upass$now.
 this.document.server.submit();  this.document.server.submit();
 return false;  return false;
 }  }
   // ]]>
 </script>  </script>
   
 ENDSCRIPT  ENDSCRIPT
Line 381  my $contactblock = &contactdisplay(\%lt, Line 390  my $contactblock = &contactdisplay(\%lt,
                             $version,$authdomain,\$helpdeskscript);                              $version,$authdomain,\$helpdeskscript);
   
 my $loginform=(<<LFORM);  my $loginform=(<<LFORM);
 <form name="client" onsubmit="return(send())">  <form name="client" action="" onsubmit="return(send())">
   <input type="hidden" name="lextkey" value="$lextkey" />    <input type="hidden" name="lextkey" value="$lextkey" />
   <input type="hidden" name="uextkey" value="$uextkey" />    <input type="hidden" name="uextkey" value="$uextkey" />
   <b><label for="uname">$lt{'un'}</label>:</b><br />    <b><label for="uname">$lt{'un'}</label>:</b><br />
Line 477  $r->print(<<ENDDOCUMENT); Line 486  $r->print(<<ENDDOCUMENT);
  </div>   </div>
   
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 // the if prevents the script error if the browser can not handle this  // the if prevents the script error if the browser can not handle this
 if ( document.client.uname ) { document.client.uname.focus(); }  if ( document.client.uname ) { document.client.uname.focus(); }
   // ]]>
 </script>  </script>
 $helpdeskscript  $helpdeskscript
   
Line 505  sub contactdisplay { Line 516  sub contactdisplay {
         my $thisurl = &escape('/adm/login');          my $thisurl = &escape('/adm/login');
         $$helpdeskscript = <<"ENDSCRIPT";          $$helpdeskscript = <<"ENDSCRIPT";
 <script type="text/javascript">  <script type="text/javascript">
   // <![CDATA[
 function helpdesk() {  function helpdesk() {
     var codedom = document.client.udom.value;      var codedom = document.client.udom.value;
     if (codedom == '') {      if (codedom == '') {
Line 514  function helpdesk() { Line 526  function helpdesk() {
     document.location.href = "/adm/helpdesk?"+querystr;      document.location.href = "/adm/helpdesk?"+querystr;
     return;      return;
 }  }
   // ]]>
 </script>  </script>
 ENDSCRIPT  ENDSCRIPT
     }      }

Removed from v.1.121  
changed lines
  Added in v.1.123


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