[LON-CAPA-cvs] cvs: loncom(loncapaMITrelate_1) /auth lonlogout.pm

raeburn raeburn at source.lon-capa.org
Wed Feb 1 13:13:47 EST 2012


raeburn		Wed Feb  1 18:13:47 2012 EDT

  Modified files:              (Branch: loncapaMITrelate_1)
    /loncom/auth	lonlogout.pm 
  Log:
  - Backport 1.44.
  
  
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.42.2.2 loncom/auth/lonlogout.pm:1.42.2.2.2.1
--- loncom/auth/lonlogout.pm:1.42.2.2	Sat Nov 19 19:10:34 2011
+++ loncom/auth/lonlogout.pm	Wed Feb  1 18:13:46 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Logout Handler
 #
-# $Id: lonlogout.pm,v 1.42.2.2 2011/11/19 19:10:34 raeburn Exp $
+# $Id: lonlogout.pm,v 1.42.2.2.2.1 2012/02/01 18:13:46 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -120,11 +120,21 @@
                      $login_url = $domdefaults{'portal_def'};
                  } else {
                      my $checkloginvia = 1;
-                     my ($lonhost,$server,$path) = 
+                     my ($lonhost,$server,$path,$isredirect) = 
                          &Apache::lonnet::choose_server($domain,$checkloginvia);
                      if ($server && $lonhost) {
                          $login_url = $Apache::lonnet::protocol{$lonhost}.
                                       '://'.$server.$path;
+                         if (($path eq '') && (!$isredirect)) {
+                             my $serverhomeID =
+                                 &Apache::lonnet::get_server_homeID($lonhost);
+                             my $serverhomedom =
+                                 &Apache::lonnet::host_domain($serverhomeID);
+                             if ($serverhomedom ne $domain) {
+                                 $path = '/adm/login';
+                                 $login_url .= $path;
+                             }
+                         }
                          if ($path eq '/adm/login' && $domain ne '') {
                              $login_url .= '?domain='.$domain;
                          }




More information about the LON-CAPA-cvs mailing list