--- loncom/auth/lonlogin.pm 2004/05/07 14:25:17 1.57 +++ loncom/auth/lonlogin.pm 2004/08/10 18:55:13 1.58 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.57 2004/05/07 14:25:17 matthew Exp $ +# $Id: lonlogin.pm,v 1.58 2004/08/10 18:55:13 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -179,15 +179,22 @@ ENDFAILED if ($logtoken eq 'con_lost') { my $spares=''; - foreach (keys %Apache::lonnet::hostname) { - if ($_ ne $lonhost) { - $spares.='
'. - $Apache::lonnet::hostname{$_}.''; - if ($Apache::lonnet::spareid{$_}) { - $spares.=' (preferred)'; - } - } + + foreach my $hostid (keys(%Apache::lonnet::spareid)) { + next if ($hostid eq $lonhost); + $spares.='
'. + $Apache::lonnet::hostname{$hostid}.''. + ' (preferred)'.$/; + } + $spares.= '
'; + foreach my $hostid (keys(%Apache::lonnet::hostname)) { + next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid}); + $spares.='
'. + $Apache::lonnet::hostname{$hostid}.''; } $r->print(<