--- loncom/auth/lonlogin.pm 2007/01/14 02:00:04 1.87
+++ loncom/auth/lonlogin.pm 2007/03/08 01:58:48 1.89
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Login Screen
#
-# $Id: lonlogin.pm,v 1.87 2007/01/14 02:00:04 raeburn Exp $
+# $Id: lonlogin.pm,v 1.89 2007/03/08 01:58:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -128,7 +128,7 @@ ENDFAILED
$r->dir_config('lonIconsURL');
my $domain = &Apache::lonnet::default_login_domain();
if (($env{'form.domain'}) &&
- ($Apache::lonnet::domaindescription{$env{'form.domain'}})) {
+ (&Apache::lonnet::domain($env{'form.domain'},'description'))) {
$domain=$env{'form.domain'};
}
my $role = $r->dir_config('lonRole');
@@ -138,7 +138,7 @@ ENDFAILED
my $include = $r->dir_config('lonIncludes');
my $expire = $r->dir_config('lonExpire');
my $version = $r->dir_config('lonVersion');
- my $host_name = $Apache::lonnet::hostname{$lonhost};
+ my $host_name = &Apache::lonnet::hostname($lonhost);
# --------------------------------------------- Default values for login fields
@@ -200,33 +200,36 @@ ENDFAILED
my $last;
foreach my $hostid (sort
{
- $Apache::lonnet::hostname{$a} cmp
- $Apache::lonnet::hostname{$b};
+ &Apache::lonnet::hostname($a) cmp
+ &Apache::lonnet::hostname($b);
}
keys(%Apache::lonnet::spareid)) {
next if ($hostid eq $lonhost);
- next if ($last eq $Apache::lonnet::hostname{$hostid});
+ my $hostname = &Apache::lonnet::hostname($hostid);
+ next if ($last eq $hostname);
$spares.='
'.
- $Apache::lonnet::hostname{$hostid}.''.
+ $hostname.''.
' (preferred)'.$/;
- $last=$Apache::lonnet::hostname{$hostid};
+ $last=$hostname;
}
$spares.= '
';
+ my %all_hostnames = &Apache::lonnet::all_hostnames();
foreach my $hostid (sort
{
- $Apache::lonnet::hostname{$a} cmp
- $Apache::lonnet::hostname{$b};
+ &Apache::lonnet::hostname($a) cmp
+ &Apache::lonnet::hostname($b);
}
- keys(%Apache::lonnet::hostname)) {
+ keys(%all_hostnames)) {
next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});
- next if ($last eq $Apache::lonnet::hostname{$hostid});
+ my $hostname = &Apache::lonnet::hostname($hostid);
+ next if ($last eq $hostname);
$spares.='
'.
- $Apache::lonnet::hostname{$hostid}.'';
- $last=$Apache::lonnet::hostname{$hostid};
+ $hostname.'';
+ $last=$hostname;
}
$r->print(<