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

raeburn raeburn@source.lon-capa.org
Tue, 06 Oct 2009 23:43:22 -0000


raeburn		Tue Oct  6 23:43:22 2009 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
  Log:
  No direct log-in.
  - &Apache::loncommon::get_domainconf() returns simple hash (not a hash of a hash etc.)
  - Get redirection setting for appropriate domain and hostID from this hash.   
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.126 loncom/auth/lonlogin.pm:1.127
--- loncom/auth/lonlogin.pm:1.126	Tue Oct  6 21:58:30 2009
+++ loncom/auth/lonlogin.pm	Tue Oct  6 23:43:21 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.126 2009/10/06 21:58:30 raeburn Exp $
+# $Id: lonlogin.pm,v 1.127 2009/10/06 23:43:21 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -113,18 +113,14 @@
 
     my $lonhost = $r->dir_config('lonHostID');
     my $domain = &Apache::lonnet::default_login_domain();
-    my %domconfig = &Apache::loncommon::get_domainconf($domain);
+    my %domconfhash = &Apache::loncommon::get_domainconf($domain);
     if ($lonhost ne '') {
-        if (ref($domconfig{login}) eq 'HASH') {
-            if (ref($domconfig{login}{loginvia}) eq 'HASH') {
-                if ($domconfig{login}{loginvia}{$lonhost}) {
-                    my $loginvia = $domconfig{login}{loginvia}{$lonhost};
-                    my %servers = &Apache::lonnet::get_servers($domain);
-                    if (($servers{$loginvia} ne '') && ($loginvia ne $lonhost)) {
-                        $r->print(&redirect_page($loginvia));
-                        return OK;
-                    }
-                }
+        my $loginvia = $domconfhash{$domain.'.login.loginvia_'.$lonhost};
+        if (($loginvia ne '') && ($loginvia ne $lonhost)) {
+            my %servers = &Apache::lonnet::get_servers($domain);
+            if ($servers{$loginvia} ne '') {
+                $r->print(&redirect_page($loginvia));
+                return OK;
             }
         }
     }