version 1.208, 2010/08/13 13:32:36
|
version 1.210, 2011/10/14 16:58:32
|
Line 120 sub handler {
|
Line 120 sub handler {
|
my $colspan=''; |
my $colspan=''; |
|
|
$extrafield=''; |
$extrafield=''; |
my $diropendb = |
my $diropendb = LONCAPA::tempdir() . |
"/home/httpd/perl/tmp/$env{'user.domain'}_$env{'user.name'}_sel_res.db"; |
"$env{'user.domain'}_$env{'user.name'}_sel_res.db"; |
%hash = (); |
%hash = (); |
{ |
{ |
my %dbfile; |
my %dbfile; |
Line 755 sub scanDir {
|
Line 755 sub scanDir {
|
sub get_list { |
sub get_list { |
my ($r,$uri)=@_; |
my ($r,$uri)=@_; |
my @list=(); |
my @list=(); |
|
|
(my $luri = $uri) =~ s/\//_/g; |
(my $luri = $uri) =~ s/\//_/g; |
if ($env{'form.updatedisplay'}) { |
if ($env{'form.updatedisplay'}) { |
foreach (keys %hash) { |
foreach (keys %hash) { |
Line 782 sub get_list {
|
Line 783 sub get_list {
|
$hash{'dirlist_files_'.$luri} = join("\n",@list); |
$hash{'dirlist_files_'.$luri} = join("\n",@list); |
$hash{'dirlist_timestamp_files_'.$luri} = time; |
$hash{'dirlist_timestamp_files_'.$luri} = time; |
} |
} |
|
#Checking for error messages associated with empty directories or inaccessible servers (See Bug 4984) |
|
if($list[0] eq 'no_such_dir' || $list[0] eq 'no_such_host') { |
|
$r->print("<p class='LC_info'>" . &mt("Directory does not exist."). "</p>"); |
|
} |
|
elsif($list[0] eq 'con_lost') { |
|
$r->print("<p class='LC_info'>" . &mt("Directory temporarily not accessible."). "</p>"); |
|
} |
|
|
return @list=&match_ext($r,@list); |
return @list=&match_ext($r,@list); |
} |
} |
|
|