--- loncom/interface/lonindexer.pm 2004/01/26 19:55:44 1.87 +++ loncom/interface/lonindexer.pm 2004/01/29 00:45:12 1.89 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.87 2004/01/26 19:55:44 www Exp $ +# $Id: lonindexer.pm,v 1.89 2004/01/29 00:45:12 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -511,9 +511,12 @@ END my $indent = 0; $uri = $uri.'/' if $uri !~ /.*\/$/; - - $hash{'top.level'} = $uri; - $toplevel = $uri; + if ($ENV{'form.dirPointer'} ne 'on') { + $hash{'top.level'} = $uri; + $toplevel = $uri; + } else { + $toplevel = $hash{'top.level'}; + } # -------------------------------- if not at top level, provide an uplink arrow if ($toplevel ne '/res/'){ @@ -725,6 +728,8 @@ sub display_line { # display domain if ($filecom[1] eq 'domain') { + $r->print (''."\n") + if ($ENV{'form.dirPointer'} eq "on"); $r->print("$extrafield"); $r->print(""); &begin_form ($r,$filecom[0]); @@ -895,8 +900,20 @@ sub display_line { my $output=''; my $embstyle=&Apache::loncommon::fileembstyle($curfext); if ($embstyle eq 'ssi') { - $output=&Apache::lonnet::ssi_body($filelink); - $output=''.$output.''; + my $cache=$Apache::lonnet::perlvar{'lonDocRoot'}.$filelink. + '.tmp'; + if ((!$ENV{'form.updatedisplay'}) && + (-e $cache)) { + open(FH,$cache); + $output=join("\n",); + close(FH); + } else { + $output=&Apache::lonnet::ssi_body($filelink); + open(FH,">$cache"); + print FH $output; + close(FH); + } + $output=''.$output.''; } elsif ($embstyle eq 'img') { $output=''; } elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) { @@ -1009,6 +1026,7 @@ sub begin_form { 'enctype="application/x-www-form-urlencoded">'."\n"); $r->print (''. "\n"); + $r->print (''."\n"); $dnum++; }