Diff for /loncom/lontrans.pm between versions 1.6 and 1.10

version 1.6, 2003/11/12 21:37:07 version 1.10, 2006/01/16 19:27:09
Line 36  use Apache::loncommon; Line 36  use Apache::loncommon;
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     if ($r->uri=~m|^/uploaded/|) {      if ($r->uri=~m|^(/raw)?/uploaded/|) {
  my (undef,undef,$udom,$uname,$ufile)=split(/\//,$r->uri);          my $fn = $r->uri();
  $ufile=~s/^[\~\.]+//;          $fn=~s/^\/raw//;
  $r->filename(&Apache::loncommon::propath($udom,$uname).          my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);
      '/userfiles/'.$ufile);   if (@ufile) { $ufile[-1]=~s/^[\~\.]+//; }
           my $chome=&Apache::lonnet::homeserver($uname,$udom);
    my $allowed=0;
    my @ids=&Apache::lonnet::current_machine_ids();
    foreach my $id (@ids) { if ($id eq $chome) { $allowed=1; } }
    if ($allowed) {
               $r->filename(&Apache::loncommon::propath($udom,$uname).
                        '/userfiles/'.(join('/',@ufile)));
           }
     } elsif ($r->uri=~m|^/~|) {      } elsif ($r->uri=~m|^/~|) {
  #internal authentication, needs fixup.   #internal authentication, needs fixup.
  my $fn = $r->uri(); # non users do not get the full path request   my $fn = $r->uri(); # non users do not get the full path request

Removed from v.1.6  
changed lines
  Added in v.1.10


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