--- loncom/interface/londocs.pm 2004/02/11 00:10:01 1.104
+++ loncom/interface/londocs.pm 2004/02/27 18:16:54 1.108
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.104 2004/02/11 00:10:01 albertel Exp $
+# $Id: londocs.pm,v 1.108 2004/02/27 18:16:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -97,13 +97,15 @@ sub authorhosts {
} else {
($cd,$ca)=($realm=~/^\/(\w+)\/(\w+)$/);
}
- if (&Apache::lonnet::homeserver($ca,$cd) eq
- $Apache::lonnet::perlvar{'lonHostID'}) {
+ my $allowed=0;
+ my $myhome=&Apache::lonnet::homeserver($ca,$cd);
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $id (@ids) { if ($id eq $myhome) { $allowed=1; } }
+ if ($allowed) {
$home++;
$outhash{'home_'.$ca.'@'.$cd}=1;
} else {
- $outhash{'otherhome_'.$ca.'@'.$cd}=
- &Apache::lonnet::homeserver($ca,$cd);
+ $outhash{'otherhome_'.$ca.'@'.$cd}=$myhome;
$other++;
}
}
@@ -395,7 +397,7 @@ sub editor {
foreach (@Apache::lonratedt::order) {
my ($name,$url)=split(/\:/,$Apache::lonratedt::resources[$_]);
unless ($name) { $name=(split(/\//,$url))[-1]; }
- unless ($name) { $name='NO RESOURCE'; $url='/adm/notfound.html'; }
+ unless ($name) { next; }
$r->print(&entryline($idx,$name,$url,$folder,$allowed,$_));
$idx++;
}
@@ -502,7 +504,7 @@ sub checkonthis {
$alreadyseen{$url}=1;
$r->rflush();
if (($url) && ($url!~/^\/uploaded\//) && ($url!~/\*$/)) {
- $r->print('
');
+ $r->print("\n
");
for (my $i=0;$i<=$level*5;$i++) {
$r->print(' ');
}
@@ -590,7 +592,8 @@ sub verifycontent {
}
}
&untiehash();
- $r->print('