version 1.132, 2011/10/25 22:04:20
|
version 1.133, 2011/10/26 17:31:40
|
Line 448 sub putdirectory {
|
Line 448 sub putdirectory {
|
my ($r, $reqfile, $here, $dirname, $modtime, $resdir, $bombs, $numdir) = @_; |
my ($r, $reqfile, $here, $dirname, $modtime, $resdir, $bombs, $numdir) = @_; |
|
|
# construct the display filename: the directory name unless ..: |
# construct the display filename: the directory name unless ..: |
|
|
|
my $actionitem; |
|
|
my $disfilename = $dirname; |
my $disfilename = $dirname; |
if ($dirname eq '..') { |
|
$disfilename = '<i>'.&mt('Parent Directory').'</i>'; |
|
} |
|
# Don't display directory itself, and there is no way up from root directory |
# Don't display directory itself, and there is no way up from root directory |
unless ( (($dirname eq '..') && ($reqfile=~/^\/[^\/]+\/[^\/]+$/)) || ($dirname eq '.')) { |
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; } |
Line 467 sub putdirectory {
|
Line 466 sub putdirectory {
|
&Apache::lonpublisher::metaeval( |
&Apache::lonpublisher::metaeval( |
&Apache::lonnet::getfile($r->dir_config('lonDocRoot').$here.'/'.$dirname.'/default.meta') |
&Apache::lonnet::getfile($r->dir_config('lonDocRoot').$here.'/'.$dirname.'/default.meta') |
); |
); |
# |
if ($dirname eq '..') { |
my $actionitem = ''; |
|
if ($here eq '..') { |
|
$actionitem = &mt('Go to ...'); |
$actionitem = &mt('Go to ...'); |
|
$disfilename = '<i>'.&mt('Parent Directory').'</i>'; |
} else { |
} else { |
$actionitem = |
$actionitem = |
'<form name="dirselect_'.$$numdir. |
'<form name="dirselect_'.$$numdir. |