version 1.129, 2011/10/21 22:33:14
|
version 1.130, 2011/10/22 12:34:01
|
Line 447 sub getSourceRightString {
|
Line 447 sub getSourceRightString {
|
sub putdirectory { |
sub putdirectory { |
my ($r, $reqfile, $here, $dirname, $modtime, $resdir, $bombs, $numdir) = @_; |
my ($r, $reqfile, $here, $dirname, $modtime, $resdir, $bombs, $numdir) = @_; |
|
|
#&Apache::lonnet::logthis("reqfile $reqfile here $here dirname $dirname resdir $resdir"); |
|
|
|
|
|
# construct the display filename: the directory name unless ..: |
# construct the display filename: the directory name unless ..: |
|
|
my $disfilename = $dirname; |
my $disfilename = $dirname; |
if ($dirname eq '..') { |
if ($dirname eq '..') { |
$disfilename = '<i>'.&mt('Parent Directory').'</i>'; |
$disfilename = '<i>'.&mt('Parent Directory').'</i>'; |
} |
} |
unless ( (($dirname eq '..') && ($reqfile eq '')) || ($dirname eq '.')) { |
# Don't display directory itself, and there is no way up from root directory |
|
unless ( (($dirname eq '..') && ($reqfile=~/^\/[^\/]+\/[^\/]+$/)) || ($dirname eq '.')) { |
my $kaputt=0; |
my $kaputt=0; |
foreach (keys %{$bombs}) { |
foreach (keys %{$bombs}) { |
if ($_=~m:^\Q$resdir\E/\Q$disfilename\E/:) { $kaputt=1; last; } |
if ($_=~m:^\Q$resdir\E/\Q$disfilename\E/:) { $kaputt=1; last; } |