[LON-CAPA-cvs] cvs: loncom /interface domainprefs.pm

raeburn raeburn@source.lon-capa.org
Mon, 16 Nov 2009 04:03:05 -0000


raeburn		Mon Nov 16 04:03:05 2009 EDT

  Modified files:              
    /loncom/interface	domainprefs.pm 
  Log:
  - preserve unchanged settings in domain config hash of hash of hash for login (outer key) and loginvia (inner key).
  
  
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.118 loncom/interface/domainprefs.pm:1.119
--- loncom/interface/domainprefs.pm:1.118	Tue Nov 10 19:12:11 2009
+++ loncom/interface/domainprefs.pm	Mon Nov 16 04:03:05 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: domainprefs.pm,v 1.118 2009/11/10 19:12:11 jms Exp $
+# $Id: domainprefs.pm,v 1.119 2009/11/16 04:03:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3231,8 +3231,10 @@
     my %servers = &dom_servers($dom);
     if (keys(%servers) > 1) {
         foreach my $lonhost (keys(%servers)) {
-            next if ($env{'form.'.$lonhost.'_serverurl'} eq $curr_loginvia{$lonhost});
             next if ($env{'form.'.$lonhost.'_serverurl'} eq $lonhost);
+            if ($env{'form.'.$lonhost.'_serverurl'} eq $curr_loginvia{$lonhost}) {
+                $loginhash{login}{loginvia}{$lonhost} = $curr_loginvia{$lonhost};                next;
+            }
             if ($curr_loginvia{$lonhost} ne '') {
                 $loginhash{login}{loginvia}{$lonhost} = $env{'form.'.$lonhost.'_serverurl'};
                 $changes{'loginvia'}{$lonhost} = 1;
@@ -3244,7 +3246,7 @@
             }
         }
     }
-    
+
     my $putresult = &Apache::lonnet::put_dom('configuration',\%loginhash,
                                              $dom);
     if ($putresult eq 'ok') {