version 1.10, 2006/01/16 19:27:09
|
version 1.12, 2006/08/17 20:22:11
|
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 lib '/home/httpd/lib/perl'; |
|
use LONCAPA; |
|
|
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
|
# FIXME line remove when mod_perl fixes BUG#4948 |
|
$r->notes->set('error-notes' => ''); |
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//; |
Line 46 sub handler {
|
Line 50 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(&Apache::loncommon::propath($udom,$uname). |
$r->filename(&propath($udom,$uname). |
'/userfiles/'.(join('/',@ufile))); |
'/userfiles/'.(join('/',@ufile))); |
} |
} |
} elsif ($r->uri=~m|^/~|) { |
} elsif ($r->uri=~m|^/~|) { |