');
@@ -1185,8 +1218,8 @@ sub handler {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['decompress','action','filename','newfilename']);
&Debug($r, "loncfile.pm - handler entered");
- &Debug($r, " filename: ".$ENV{'form.filename'});
- &Debug($r, " newfilename: ".$ENV{'form.newfilename'});
+ &Debug($r, " filename: ".$env{'form.filename'});
+ &Debug($r, " newfilename: ".$env{'form.newfilename'});
#
# Determine the root filename
# This could come in as "filename", which actually is a URL, or
@@ -1194,28 +1227,28 @@ sub handler {
#
my $fn;
- if ($ENV{'form.filename'}) {
- &Debug($r, "test: $ENV{'form.filename'}");
- $fn=&Apache::lonnet::unescape($ENV{'form.filename'});
+ if ($env{'form.filename'}) {
+ &Debug($r, "test: $env{'form.filename'}");
+ $fn=&Apache::lonnet::unescape($env{'form.filename'});
$fn=&URLToPath($fn);
- } elsif($ENV{'QUERY_STRING'} && $ENV{'form.phase'} ne 'two') {
+ } elsif($ENV{'QUERY_STRING'} && $env{'form.phase'} ne 'two') {
#Just hijack the script only the first time around to inject the
#correct information for further processing
- $fn=&Apache::lonnet::unescape($ENV{'form.decompress'});
+ $fn=&Apache::lonnet::unescape($env{'form.decompress'});
$fn=&URLToPath($fn);
- $ENV{'form.action'}="decompress";
- } elsif ($ENV{'form.qualifiedfilename'}) {
- $fn=$ENV{'form.qualifiedfilename'};
+ $env{'form.action'}="decompress";
+ } elsif ($env{'form.qualifiedfilename'}) {
+ $fn=$env{'form.qualifiedfilename'};
} else {
&Debug($r, "loncfile::handler - no form.filename");
- $r->log_reason($ENV{'user.name'}.' at '.$ENV{'user.domain'}.
+ $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
' unspecified filename for cfile', $r->filename);
return HTTP_NOT_FOUND;
}
unless ($fn) {
&Debug($r, "loncfile::handler - doctored url is empty");
- $r->log_reason($ENV{'user.name'}.' at '.$ENV{'user.domain'}.
+ $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
' trying to cfile non-existing file', $r->filename);
return HTTP_NOT_FOUND;
}
@@ -1230,7 +1263,7 @@ sub handler {
"loncfile::handler constructaccess uname = $uname domain = $udom");
unless (($uname) && ($udom)) {
$r->log_reason($uname.' at '.$udom.
- ' trying to manipulate file '.$ENV{'form.filename'}.
+ ' trying to manipulate file '.$env{'form.filename'}.
' ('.$fn.') - not authorized',
$r->filename);
return HTTP_NOT_ACCEPTABLE;
@@ -1240,10 +1273,12 @@ sub handler {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- if ( ($ENV{'form.action'} eq 'newdir') && ($ENV{'form.phase'} eq 'two') && ( ($ENV{'form.callingmode'} eq 'testbank') || ($ENV{'form.callingmode'} eq 'imsimport') ) ) {
- my $newdirname = $ENV{'form.newfilename'};
- $r->print('LON-CAPA Construction Space
- |);
- my $loaditem = 'onLoad="writeDone()"';
- $r->print(&Apache::loncommon::bodytag('Construction Space File Operation','',$loaditem));
- } else {
- $r->print('LON-CAPA Construction Space');
- $r->print(&Apache::loncommon::bodytag('Construction Space File Operation'));
+|;
+ $loaditem{'onload'} = "writeDone()";
}
-
+
+ $r->print(&Apache::loncommon::start_page('Construction Space File Operation',
+ $js,
+ {'add_entries' => \%loaditem,}));
$r->print('
'.&mt('Location').': '.&display($fn).'
');
- if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
+ if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
$r->print('
'.&mt('Co-Author').': '.$uname.' at '.$udom.
'
');
}
- &Debug($r, "loncfile::handler Form action is $ENV{'form.action'} ");
- if ($ENV{'form.action'} eq 'delete') {
+ &Debug($r, "loncfile::handler Form action is $env{'form.action'} ");
+ if ($env{'form.action'} eq 'delete') {
$r->print('