Diff for /loncom/interface/lonclonecourse.pm between versions 1.7 and 1.8

version 1.7, 2008/09/11 13:19:28 version 1.8, 2011/10/17 12:41:30
Line 48  sub innercrsdirlist { Line 48  sub innercrsdirlist {
     unless ($path)  { $path=''; } else { $path.='/'; }      unless ($path)  { $path=''; } else { $path.='/'; }
     my %crsdata=&Apache::lonnet::coursedescription($courseid);      my %crsdata=&Apache::lonnet::coursedescription($courseid);
     my $getpropath = 1;      my $getpropath = 1;
     my @listing=&Apache::lonnet::dirlist      my ($dirlistref,$listerror) = 
  ($which,$crsdata{'domain'},$crsdata{'num'},$getpropath);          &Apache::lonnet::dirlist($which,$crsdata{'domain'},
     foreach (@listing) {                                   $crsdata{'num'},$getpropath);
  unless ($_=~/^\./) {      if (ref($dirlistref) eq 'ARRAY') {
     my @unpackline = split (/\&/,$_);          foreach (@{$dirlistref}) {
     if ($unpackline[3]&$dirptr) {      unless ($_=~/^\./) {
           my @unpackline = split (/\&/,$_);
           if ($unpackline[3]&$dirptr) {
 # is a directory, recurse  # is a directory, recurse
  &innercrsdirlist($courseid,$which.$unpackline[0],      &innercrsdirlist($courseid,$which.$unpackline[0],
             $path.$unpackline[0]);       $path.$unpackline[0]);
     } else {           } else { 
 # is a file, put into output  # is a file, put into output
  push (@output,$path.$unpackline[0]);      push (@output,$path.$unpackline[0]);
           }
     }      }
  }          }
     }      }
     return @output;      return @output;
 }  }

Removed from v.1.7  
changed lines
  Added in v.1.8


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