version 1.12, 2006/08/17 20:22:11
|
version 1.14, 2011/10/21 16:03:06
|
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|^/~|) { |
|
#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; } |
} else { return DECLINED; } |
return OK; |
return OK; |
} |
} |