[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 13 Feb 2003 16:31:54 -0000


www		Thu Feb 13 11:31:54 2003 EDT

  Modified files:              
    /loncom/auth	lonauth.pm 
  Log:
  Relay interface information to environment
  
  
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.36 loncom/auth/lonauth.pm:1.37
--- loncom/auth/lonauth.pm:1.36	Mon Feb  3 13:03:52 2003
+++ loncom/auth/lonauth.pm	Thu Feb 13 11:31:54 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # User Authentication Module
 #
-# $Id: lonauth.pm,v 1.36 2003/02/03 18:03:52 harris41 Exp $
+# $Id: lonauth.pm,v 1.37 2003/02/13 16:31:54 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -45,6 +45,9 @@
 use Apache::lonnet();
 use Apache::lonmenu();
 use Fcntl qw(:flock);
+
+my %FORM;
+
 # ------------------------------------------------------------ Successful login
 
 sub success {
@@ -138,7 +141,12 @@
             print $idf "request.course.uri=\n";
             print $idf "request.course.sec=\n";
             print $idf "request.role=cm\n";
-            print $idf "request.host=$ENV{'HTTP_HOST'}\n"; 
+            print $idf "request.host=$ENV{'HTTP_HOST'}\n";
+            if ($FORM{'interface'}) {
+		$FORM{'interface'}=~s/\W//gs;
+                print $idf "browser.interface=$FORM{'interface'}\n";
+                $ENV{'browser.interface'}=$FORM{'interface'};
+            } 
             if ($userroles ne '') { print $idf "$userroles"; }
 	    $idf->close();
         }
@@ -223,7 +231,9 @@
     my $buffer;
     $r->read($buffer,$r->header_in('Content-length'));
     my @pairs=split(/&/,$buffer);
-    my $pair; my $name; my $value; my %FORM;
+    my $pair; my $name; my $value;
+    undef %FORM;
+    %FORM=();
     foreach $pair (@pairs) {
        ($name,$value) = split(/=/,$pair);
        $value =~ tr/+/ /;