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

version 1.1, 2002/08/02 14:45:04 version 1.7, 2004/03/31 17:02:51
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 LONCAPA::Configuration;
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     return DECLINED;      my $configvars = &LONCAPA::Configuration::read_conf('loncapa.conf');
       if ($r->uri=~m|^(/raw)?/uploaded/|) {
           my $fn = $r->uri();
           $fn=~s/^\/raw//;
           my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);
           $ufile[-1]=~s/^[\~\.]+//;
           my $chome=&Apache::lonnet::homeserver($uname,$udom);
           if ($chome eq $$configvars{'lonHostID'}) {
               $r->filename(&Apache::loncommon::propath($udom,$uname).
                        '/userfiles/'.(join('/',@ufile)));
           }
       } elsif ($r->uri=~m|^/~|) {
    #internal authentication, needs fixup.
    my $fn = $r->uri(); # non users do not get the full path request
                    # through SCRIPT_FILENAME
    $fn=~s|^/~(\w+)|/home/$1/public_html|;
    $r->filename($fn);
       } else { return DECLINED; }
       return OK;
 }  }
   
 1;  1;

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


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