" . &mt("Directory temporarily not accessible."). "
");
+ }
+
return @list=&match_ext($r,@list);
}
@@ -864,7 +885,7 @@ sub match_ext {
# ------------------------------- displays one line in appropriate table format
sub display_line {
- my ($r,$diropen,$line,$indent,$startdir,$hashref,@list)=@_;
+ my ($r,$defdom,$diropen,$line,$indent,$startdir,$hashref,@list)=@_;
my (@pathfn, $fndir);
# there could be relative paths (files actually belonging into this directory)
# or absolute paths (for example, from sequences)
@@ -923,13 +944,22 @@ sub display_line {
$r->print ('print (' alt="'.$msg.'" class="LC_fileicon" />'.
"\n");
- $r->print(&mt("Up")."$tabtag");
+ $r->print(&mt("Up")."
$tabtag");
$r->print(&Apache::loncommon::end_data_table_row());
return OK;
}
# Do we have permission to look at this?
if($filecom[15] ne '1') { return OK if ((!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])) && (!&Apache::lonnet::allowed('bro',$pathprefix.$filecom[0]))); }
+ if (($filecom[1] eq 'domain') && ($defdom ne $listname)) {
+ unless (&Apache::lonnet::will_trust('shared',$listname,$defdom)) {
+ return OK;
+ }
+ unless (&Apache::lonnet::will_trust('content',$defdom,$listname)) {
+ return OK;
+ }
+ }
+
# make absolute links appear on different background
#SB if ($absolute) { $fileclr='#ccdd99'; }
@@ -958,13 +988,23 @@ $r->print ('(".&Apache::lonnet::domain($listname,'description').
")");
}
- $r->print("$tabtag");
+ $r->print("
$tabtag");
$r->print(&Apache::loncommon::end_data_table_row());
return OK;
# display user directory
}
+
if ($filecom[1] eq 'user') {
+ my $domain=(split(m|/|,$startdir))[2];
+ if ($defdom ne $domain) {
+ unless (&Apache::lonnet::will_trust('shared',$domain,$defdom)) {
+ return OK;
+ }
+ unless (&Apache::lonnet::will_trust('content',$defdom,$domain)) {
+ return OK;
+ }
+ }
# $r->print("
$extrafield");
my $curdir = $startdir.$filecom[0].'/';
my $anchor = $curdir;
@@ -982,6 +1022,9 @@ $r->print (''.
"\n");
my $quotable_curdir = &Apache::loncommon::escape_single($curdir);
+ my $quotable_startdir = &Apache::loncommon::escape_single($startdir);
+ my $quotable_listname = &Apache::loncommon::escape_single($listname);
+
$r->print ('');
@@ -990,7 +1033,12 @@ $r->print ('print(''.$tabtag);
+# Wishlistlink
+ $r->print('
'.
+ ''.$tabtag);
$r->print(&Apache::loncommon::end_data_table_row());
return OK;
}
@@ -1071,20 +1119,24 @@ $r->print ('\n");
my $quotable_filelink = &Apache::loncommon::escape_single($filelink);
+ my $quotable_startdir = Apache::loncommon::escape_single($startdir);
+ my $quotable_listname = &Apache::loncommon::escape_single($listname);
- $r->print (" $listname ");
+ $r->print (" $listname ");
$quotable_filelink = &Apache::loncommon::escape_single($filelink.'.meta');
&Apache::loncommon::inhibit_menu_check(\$quotable_filelink);
- $r->print (" (".&mt('metadata').") ");
+ $r->print (" (".&mt('metadata').") ");
# Close form to open/close sequence
if ($filelink=~/\.(page|sequence)$/) {
$r->print('');
}
$r->print("