[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /auth switchserver.pm

raeburn raeburn@source.lon-capa.org
Wed, 18 Aug 2010 19:40:23 -0000


raeburn		Wed Aug 18 19:40:23 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/auth	switchserver.pm 
  Log:
  - Backport 1.29.
  
  
Index: loncom/auth/switchserver.pm
diff -u loncom/auth/switchserver.pm:1.28.2.1 loncom/auth/switchserver.pm:1.28.2.2
--- loncom/auth/switchserver.pm:1.28.2.1	Fri Aug 13 00:06:27 2010
+++ loncom/auth/switchserver.pm	Wed Aug 18 19:40:23 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Switch Servers Handler
 #
-# $Id: switchserver.pm,v 1.28.2.1 2010/08/13 00:06:27 raeburn Exp $
+# $Id: switchserver.pm,v 1.28.2.2 2010/08/18 19:40:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -121,7 +121,11 @@
         my $canhost = 1;
         my $uprimary_id = &Apache::lonnet::domain($env{'user.domain'},'primary');
         my $uint_dom = &Apache::lonnet::internet_dom($uprimary_id);
-        my @intdoms = &Apache::lonnet::get_internet_names($env{'form.otherserver'});
+        my @intdoms;
+        my $internet_names = &Apache::lonnet::get_internet_names($env{'form.otherserver'});
+        if (ref($internet_names) eq 'ARRAY') {
+            @intdoms = @{$internet_names};
+        }
         unless ($uint_dom ne '' && grep(/^\Q$uint_dom\E$/,@intdoms)) {
             my $serverhomeID = &Apache::lonnet::get_server_homeID($switch_to);
             my $serverhomedom = &Apache::lonnet::host_domain($serverhomeID);