version 1.46, 2003/05/13 00:52:46
|
version 1.53, 2004/12/14 20:32:15
|
Line 44 use Apache::Constants qw(:common :http :
|
Line 44 use Apache::Constants qw(:common :http :
|
use Apache::File; |
use Apache::File; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
|
use Apache::lonlocal; |
use CGI::Cookie(); |
use CGI::Cookie(); |
use Fcntl qw(:flock); |
use Fcntl qw(:flock); |
|
|
Line 63 sub handler {
|
Line 64 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 |
|
|
if ($requrl=~/^\/res\//) { |
if ($requrl=~/^\/+(res|uploaded)\//) { |
$ENV{'request.state'} = "published"; |
$ENV{'request.state'} = "published"; |
} else { |
} else { |
$ENV{'request.state'} = 'unknown'; |
$ENV{'request.state'} = 'unknown'; |
} |
} |
$ENV{'request.filename'} = $r->filename; |
$ENV{'request.filename'} = $r->filename; |
|
$ENV{'request.noversionuri'} = &Apache::lonnet::deversion($requrl); |
# -------------------------------------------------------- Load POST parameters |
# -------------------------------------------------------- Load POST parameters |
|
|
&Apache::loncommon::get_posted_cgi($r); |
&Apache::loncommon::get_posted_cgi($r); |
Line 104 sub handler {
|
Line 109 sub handler {
|
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$)/) || |
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$)/) || |
($requrl=~/^\/adm\/wrapper\//) || |
($requrl=~/^\/adm\/wrapper\//) || |
|
($requrl=~m|\.problem/smpedit$|) || |
($requrl=~/^\/public\/.*\/syllabus$/)) { |
($requrl=~/^\/public\/.*\/syllabus$/)) { |
# ------------------------------------- This is serious stuff, get symb and log |
# ------------------------------------- This is serious stuff, get symb and log |
my $query=$r->args; |
my $query=$r->args; |
Line 111 sub handler {
|
Line 117 sub handler {
|
if ($query) { |
if ($query) { |
&Apache::loncommon::get_unprocessed_cgi($query,['symb']); |
&Apache::loncommon::get_unprocessed_cgi($query,['symb']); |
} |
} |
|
&Apache::lonnet::logthis("form.symb is ".$ENV{'form.symb'}); |
if ($ENV{'form.symb'}) { |
if ($ENV{'form.symb'}) { |
$symb=&Apache::lonnet::symbclean($ENV{'form.symb'}); |
$symb=&Apache::lonnet::symbclean($ENV{'form.symb'}); |
if (&Apache::lonnet::symbverify($symb,$requrl)) { |
if ($requrl =~ m|^/adm/wrapper/|) { |
my ($map,$mid,$murl)=split(/\_\_\_/,$symb); |
my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); |
|
&Apache::lonnet::symblist($map,$murl => $mid, |
|
'last_known' => $murl); |
|
} elsif ((&Apache::lonnet::symbverify($symb,$requrl)) || |
|
(($requrl=~m|(.*)/smpedit$|) && |
|
&Apache::lonnet::symbverify($symb,$1))) { |
|
my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); |
&Apache::lonnet::symblist($map,$murl => $mid, |
&Apache::lonnet::symblist($map,$murl => $mid, |
'last_known' => $murl); |
'last_known' => $murl); |
} else { |
} else { |