version 1.28, 2003/05/13 00:52:46
|
version 1.32, 2004/01/15 20:22:47
|
Line 42 use Apache::Constants qw(:common :http :
|
Line 42 use Apache::Constants qw(:common :http :
|
use Apache::File; |
use Apache::File; |
use CGI::Cookie(); |
use CGI::Cookie(); |
use Fcntl qw(:flock); |
use Fcntl qw(:flock); |
|
use Apache::lonlocal; |
|
|
sub constructaccess { |
sub constructaccess { |
my ($url,$ownerdomain)=@_; |
my ($url,$ownerdomain)=@_; |
my ($ownername)=($url=~/\/(?:\~|priv\/|home\/)(\w+)/); |
my ($ownername)=($url=~/\/(?:\~|priv\/|home\/)(\w+)\//); |
unless (($ownername) && ($ownerdomain)) { return ''; } |
unless (($ownername) && ($ownerdomain)) { return ''; } |
# We do not allow editing of previous versions of files. |
# We do not allow editing of previous versions of files. |
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |
if ($url=~/\.(\d+)\.(\w+)$/) { return ''; } |
Line 55 sub constructaccess {
|
Line 56 sub constructaccess {
|
} |
} |
|
|
my $capriv='user.priv.ca./'. |
my $capriv='user.priv.ca./'. |
$ownerdomain.'/'.$ownername.'./'. |
$ownerdomain.'/'.$ownername.'./'; |
$ownerdomain.'/'.$ownername; |
|
foreach (keys %ENV) { |
foreach (keys %ENV) { |
if ($_ eq $capriv) { |
if ($_ eq $capriv) { |
return ($ownername,$ownerdomain); |
return ($ownername,$ownerdomain); |
} |
} |
} |
} |
|
|
return ''; |
return ''; |
} |
} |
|
|
Line 83 sub handler {
|
Line 82 sub handler {
|
|
|
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); |
&Apache::lonnet::transfer_profile_to_env($lonidsdir,$handle); |
|
|
|
# --------------------------------------------------------- Initialize Language |
|
|
|
&Apache::lonlocal::get_language_handle($r); |
|
|
# -------------------------------------------------------------- Resource State |
# -------------------------------------------------------------- Resource State |
|
|
$ENV{'request.state'} = "construct"; |
$ENV{'request.state'} = "construct"; |