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

version 1.1, 2002/08/02 14:45:04 version 1.6, 2003/11/12 21:37:07
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;
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
     return DECLINED;      if ($r->uri=~m|^/uploaded/|) {
    my (undef,undef,$udom,$uname,$ufile)=split(/\//,$r->uri);
    $ufile=~s/^[\~\.]+//;
    $r->filename(&Apache::loncommon::propath($udom,$uname).
        '/userfiles/'.$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.6


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