Diff for /loncom/lontrans.pm between versions 1.9 and 1.11

version 1.9, 2004/07/02 07:58:01 version 1.11, 2006/05/30 12:45:12
Line 32  use strict; Line 32  use strict;
 use Apache::Constants qw(:common :remotehost);  use Apache::Constants qw(:common :remotehost);
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::File();  use Apache::File();
 use Apache::loncommon;  use lib '/home/httpd/lib/perl';
   use LONCAPA;
   
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
Line 40  sub handler { Line 42  sub handler {
         my $fn = $r->uri();          my $fn = $r->uri();
         $fn=~s/^\/raw//;          $fn=~s/^\/raw//;
         my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);          my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);
         $ufile[-1]=~s/^[\~\.]+//;   if (@ufile) { $ufile[-1]=~s/^[\~\.]+//; }
         my $chome=&Apache::lonnet::homeserver($uname,$udom);          my $chome=&Apache::lonnet::homeserver($uname,$udom);
  my $allowed=0;   my $allowed=0;
  my @ids=&Apache::lonnet::current_machine_ids();   my @ids=&Apache::lonnet::current_machine_ids();
  foreach my $id (@ids) { if ($id eq $chome) { $allowed=1; } }   foreach my $id (@ids) { if ($id eq $chome) { $allowed=1; } }
  if ($allowed) {   if ($allowed) {
             $r->filename(&Apache::loncommon::propath($udom,$uname).              $r->filename(&propath($udom,$uname).
                      '/userfiles/'.(join('/',@ufile)));                       '/userfiles/'.(join('/',@ufile)));
         }          }
     } elsif ($r->uri=~m|^/~|) {      } elsif ($r->uri=~m|^/~|) {

Removed from v.1.9  
changed lines
  Added in v.1.11


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