--- loncom/interface/lonindexer.pm 2004/07/15 14:47:31 1.120 +++ loncom/interface/lonindexer.pm 2004/09/07 20:38:20 1.123 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.120 2004/07/15 14:47:31 matthew Exp $ +# $Id: lonindexer.pm,v 1.123 2004/09/07 20:38:20 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -179,7 +179,7 @@ END ' border="0" />'; $colspan=" colspan='2' "; my $cl=&mt('Close'); - my $gi=&mt('Group Import'); + my $gi=&mt('Import'); $closebutton=< END @@ -662,10 +662,12 @@ sub get_list { if ($ENV{'form.updatedisplay'}) { foreach (keys %hash) { delete $hash{$_} if ($_ =~ /^dirlist_files_/); + delete $hash{$_} if ($_ =~ /^dirlist_timestamp_files_/); } } - if ($hash{'dirlist_files_'.$luri}) { + if (defined($hash{'dirlist_files_'.$luri}) && + $hash{'dirlist_timestamp_files_'.$luri}+600 > (time)) { @list = split(/\n/,$hash{'dirlist_files_'.$luri}); } elsif ($uri=~/\.(page|sequence)\/$/) { # is a page or a sequence @@ -681,6 +683,7 @@ sub get_list { # is really a directory @list = &Apache::lonnet::dirlist($uri); $hash{'dirlist_files_'.$luri} = join("\n",@list); + $hash{'dirlist_timestamp_files_'.$luri} = time; } return @list=&match_ext($r,@list); }