[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /lonnet/perl lonnet.pm

raeburn raeburn@source.lon-capa.org
Tue, 17 Aug 2010 01:49:04 -0000


raeburn		Tue Aug 17 01:49:04 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - Some changes missed in earlier backport of 1.1074, 1.1075.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1056.4.5 loncom/lonnet/perl/lonnet.pm:1.1056.4.6
--- loncom/lonnet/perl/lonnet.pm:1.1056.4.5	Tue Aug 17 01:38:08 2010
+++ loncom/lonnet/perl/lonnet.pm	Tue Aug 17 01:49:04 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1056.4.5 2010/08/17 01:38:08 raeburn Exp $
+# $Id: lonnet.pm,v 1.1056.4.6 2010/08/17 01:49:04 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4306,7 +4306,6 @@
                                 my %rolehash = &get('roles',[$$where.'_'.$$role],$env{'user.domain'},
                                                     $env{'user.name'});
                                 my ($trole) = split('_',$rolehash{$$where.'_'.$$role},2);
-
                                 (undef,my $group_privs) = split(/\//,$trole);
                                 $group_privs = &unescape($group_privs);
                                 &group_roleprivs(\%allgroups,$$where,$group_privs,$$tend,$$tstart);
@@ -6776,7 +6775,6 @@
     if ($uhome eq 'no_host') {
         $newuser = 1;
     }
-
 # ----------------------------------------------------------------- Create User
     if (($uhome eq 'no_host') && 
 	(($umode && $upass) || ($umode eq 'localauth'))) {
@@ -6836,6 +6834,7 @@
         %names = @tmp;
         %oldnames = %names;
     }
+#
 # If name, email and/or uid are blank (e.g., because an uploaded file
 # of users did not contain them), do not overwrite existing values
 # unless field is in $candelete array ref.  
@@ -6887,10 +6886,6 @@
             }
         }
     }
-    my $reply = &put('environment', \%names, $udom,$uname);
-    if ($reply ne 'ok') { return 'error: '.$reply; }
-    my $sqlresult = &update_allusers_table($uname,$udom,\%names);
-    &devalidate_cache_new('namescache',$uname.':'.$udom);
     my $logmsg = $udom.', '.$uname.', '.$uid.', '.
                  $umode.', '.$first.', '.$middle.', '.
                  $last.', '.$gene.', '.$email.', '.$inststatus;
@@ -8593,7 +8588,6 @@
 			    }
 			}
 		    } else { 
-			
 			if (defined($token->[2]->{'name'})) { 
 			    $unikey.='_'.$token->[2]->{'name'}; 
 			}
@@ -9943,6 +9937,7 @@
     my %libserv;
     my $loaded;
     my %name_to_host;
+    my %internetdom;
 
     sub parse_hosts_tab {
 	my ($file) = @_;
@@ -9950,7 +9945,7 @@
 	    next if ($configline =~ /^(\#|\s*$ )/x);
 	    next if ($configline =~ /^\^/);
 	    chomp($configline);
-	    my ($id,$domain,$role,$name,$protocol)=split(/:/,$configline);
+	    my ($id,$domain,$role,$name,$protocol,$intdom)=split(/:/,$configline);
 	    $name=~s/\s//g;
 	    if ($id && $domain && $role && $name) {
 		$hostname{$id}=$name;
@@ -9966,6 +9961,9 @@
                 } else {
                     $protocol{$id} = 'http';
                 }
+                if (defined($intdom)) {
+                    $internetdom{$id} = $intdom;
+                }
 	    }
 	}
     }
@@ -10082,7 +10080,6 @@
         my ($lonid) = @_;
         return $internetdom{$lonid};
     }
-
 }
 
 {