Diff for /loncom/lontrans.pm between versions 1.7 and 1.8

version 1.7, 2004/03/31 17:02:51 version 1.8, 2004/04/01 20:18:29
Line 33  use Apache::Constants qw(:common :remote Line 33  use Apache::Constants qw(:common :remote
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::File();  use Apache::File();
 use Apache::loncommon;  use Apache::loncommon;
 use LONCAPA::Configuration;  
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     my $configvars = &LONCAPA::Configuration::read_conf('loncapa.conf');  
     if ($r->uri=~m|^(/raw)?/uploaded/|) {      if ($r->uri=~m|^(/raw)?/uploaded/|) {
         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/^[\~\.]+//;          $ufile[-1]=~s/^[\~\.]+//;
         my $chome=&Apache::lonnet::homeserver($uname,$udom);          my $chome=&Apache::lonnet::homeserver($uname,$udom);
         if ($chome eq $$configvars{'lonHostID'}) {          if ($chome eq $Apache::lonnet::perlvar{'lonHostID'}) {
             $r->filename(&Apache::loncommon::propath($udom,$uname).              $r->filename(&Apache::loncommon::propath($udom,$uname).
                      '/userfiles/'.(join('/',@ufile)));                       '/userfiles/'.(join('/',@ufile)));
         }          }

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


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