Diff for /loncom/lontrans.pm between versions 1.12 and 1.13

version 1.12, 2006/08/17 20:22:11 version 1.13, 2006/12/06 22:22:36
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 lib '/home/httpd/lib/perl';  
 use LONCAPA;  use LONCAPA;
   
   
Line 50  sub handler { Line 49  sub handler {
  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(&propath($udom,$uname).      $r->filename(&propath($udom,$uname).
                      '/userfiles/'.(join('/',@ufile)));   '/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
                  # through SCRIPT_FILENAME                   # through SCRIPT_FILENAME
  $fn=~s|^/~(\w+)|/home/$1/public_html|;   $fn=~s|^/~($LONCAPA::username_re)|/home/$1/public_html|;
  $r->filename($fn);   $r->filename($fn);
     } else { return DECLINED; }      } else { return DECLINED; }
     return OK;      return OK;

Removed from v.1.12  
changed lines
  Added in v.1.13


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