version 1.122, 2008/11/29 10:34:30
|
version 1.125, 2009/04/14 23:52:07
|
Line 242 sub upload_size_allowed {
|
Line 242 sub upload_size_allowed {
|
&Apache::loncommon::add_to_env("form.$item",$savesize); |
&Apache::loncommon::add_to_env("form.$item",$savesize); |
my $maxsize= &Apache::lonnet::EXT("resource.$ident.maxfilesize"); |
my $maxsize= &Apache::lonnet::EXT("resource.$ident.maxfilesize"); |
if (!$maxsize) { |
if (!$maxsize) { |
$maxsize = 100.0; |
$maxsize = 10.0; # FIXME This should become a domain configuration. |
} |
} |
if ($size > $maxsize) { |
if ($size > $maxsize) { |
my $warn = 'HWFILETOOBIG'.$ident; |
my $warn = 'HWFILETOOBIG'.$ident; |
Line 352 sub handler {
|
Line 352 sub handler {
|
return OK; |
return OK; |
} |
} |
|
|
|
if ($requrl =~ m{^/res/adm/pages/[^/]+\.(gif|png)$}) { |
|
return OK; |
|
} |
|
|
my $handle = &Apache::lonnet::check_for_valid_session($r); |
my $handle = &Apache::lonnet::check_for_valid_session($r); |
|
|
my $result = &sso_login($r,$handle); |
my $result = &sso_login($r,$handle); |
Line 445 sub handler {
|
Line 449 sub handler {
|
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
&Apache::lonnet::countacc($requrl); |
&Apache::lonnet::countacc($requrl); |
$requrl=~/\.(\w+)$/; |
$requrl=~/\.(\w+)$/; |
|
my $query=$r->args; |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$ )/x) || |
($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$ )/x) || |
($requrl=~/^\/adm\/wrapper\//) || |
($requrl=~/^\/adm\/wrapper\//) || |
Line 452 sub handler {
|
Line 457 sub handler {
|
($requrl=~m|\.problem/smpedit$|) || |
($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 $symb; |
my $symb; |
if ($query) { |
if ($query) { |
&Apache::loncommon::get_unprocessed_cgi($query,['symb']); |
&Apache::loncommon::get_unprocessed_cgi($query,['symb']); |
Line 499 sub handler {
|
Line 503 sub handler {
|
# ------------------------------------------------------- This is other content |
# ------------------------------------------------------- This is other content |
&Apache::lonnet::courseacclog($requrl); |
&Apache::lonnet::courseacclog($requrl); |
} |
} |
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};; |
|
if ($requrl =~ m{^/+uploaded/\Q$cdom\E/\Q$cnum\E/docs/.+\.html?$}) { |
|
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
if ($query) { |
|
&Apache::loncommon::get_unprocessed_cgi($query,['forceedit']); |
|
if ($env{'form.forceedit'}) { |
|
$env{'request.state'} = 'edit'; |
|
} |
|
} |
|
} |
|
} |
} |
} |
return OK; |
return OK; |
} |
} |