--- loncom/lonnet/perl/lonnet.pm 2004/01/15 19:41:00 1.463 +++ loncom/lonnet/perl/lonnet.pm 2004/01/27 22:54:59 1.465 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.463 2004/01/15 19:41:00 albertel Exp $ +# $Id: lonnet.pm,v 1.465 2004/01/27 22:54:59 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4459,7 +4459,7 @@ sub filelocation { $location=$file; } else { $file=~s/^$perlvar{'lonDocRoot'}//; - $file=~s:^/*res::; + $file=~s:^/res/:/:; if ( !( $file =~ m:^/:) ) { $location = $dir. '/'.$file; } else { @@ -4486,6 +4486,30 @@ sub hreflocation { return $file; } +sub current_machine_domains { + my $hostname=$hostname{$perlvar{'lonHostID'}}; + my @domains; + while( my($id, $name) = each(%hostname)) { + &logthis("-$id-$name-$hostname-"); + if ($hostname eq $name) { + push(@domains,$hostdom{$id}); + } + } + return @domains; +} + +sub current_machine_ids { + my $hostname=$hostname{$perlvar{'lonHostID'}}; + my @ids; + while( my($id, $name) = each(%hostname)) { + &logthis("-$id-$name-$hostname-"); + if ($hostname eq $name) { + push(@ids,$id); + } + } + return @ids; +} + # ------------------------------------------------------------- Declutters URLs sub declutter {