Diff for /loncom/interface/lonindexer.pm between versions 1.91 and 1.94

version 1.91, 2004/02/05 03:47:04 version 1.94, 2004/03/26 19:35:59
Line 47  use strict; Line 47  use strict;
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonhtmlcommon();  use Apache::lonhtmlcommon();
   use Apache::lonsequence();
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use Apache::lonmeta;  use Apache::lonmeta;
 use Apache::File;  use Apache::File;
Line 568  sub scanDir { Line 569  sub scanDir {
     foreach my $line (@list) {      foreach my $line (@list) {
         return if ($c->aborted());          return if ($c->aborted());
  #This is a kludge, sorry aboot this   #This is a kludge, sorry aboot this
  my ($strip,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs)=split(/\&/,$line,15);    my ($strip,$dom,undef,$testdir,undef,undef,undef,undef,undef,undef,undef,undef,undef,undef,$obs,undef)=split(/\&/,$line,16); 
  next if($strip =~ /.*\.meta$/ | $obs eq '1');   next if($strip =~ /.*\.meta$/ | $obs eq '1');
  my (@fileparts) = split(/\./,$strip);   my (@fileparts) = split(/\./,$strip);
  if ($hash{'display_attrs_9'} != 1) {   if ($hash{'display_attrs_9'} != 1) {
Line 618  sub get_list { Line 619  sub get_list {
   
     if ($hash{'dirlist_files_'.$luri}) {      if ($hash{'dirlist_files_'.$luri}) {
  @list = split(/\n/,$hash{'dirlist_files_'.$luri});   @list = split(/\n/,$hash{'dirlist_files_'.$luri});
       } elsif ($uri=~/\.(page|sequence)$/) {
   # is a page or a sequence
    @list= &Apache::lonsequence::attemptread(&Apache::lonnet::filelocation('',$uri)); 
    $hash{'dirlist_files_'.$luri} = join("\n",@list);
     } else {      } else {
   # is really a directory
  @list = &Apache::lonnet::dirlist($uri);   @list = &Apache::lonnet::dirlist($uri);
  $hash{'dirlist_files_'.$luri} = join("\n",@list);   $hash{'dirlist_files_'.$luri} = join("\n",@list);
     }      }
Line 721  sub display_line { Line 727  sub display_line {
  $r->print(&mt("Up")." $tabtag</tr></form>\n");   $r->print(&mt("Up")." $tabtag</tr></form>\n");
  return OK;   return OK;
     }      }
 # Do we have permission to look at this?  # Do we have permission to look at this? 
       if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$startdir.$filecom[0])); }
     return OK if (!&Apache::lonnet::allowed('bre',$startdir.$filecom[0]));  
   
 # display domain  # display domain
     if ($filecom[1] eq 'domain') {      if ($filecom[1] eq 'domain') {

Removed from v.1.91  
changed lines
  Added in v.1.94


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>