--- loncom/publisher/loncfile.pm 2003/11/19 14:57:32 1.44 +++ loncom/publisher/loncfile.pm 2003/11/19 15:06:33 1.45 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.44 2003/11/19 14:57:32 taceyjo1 Exp $ +# $Id: loncfile.pm,v 1.45 2003/11/19 15:06:33 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,7 +73,7 @@ use Apache::Log (); use Apache::lonnet; use Apache::loncommon(); -my $DEBUG=2; +my $DEBUG=0; my $r; # Needs to be global for some stuff RF. =pod @@ -110,31 +110,12 @@ sub Debug { # Put out the indicated message butonly if DEBUG is true. if ($DEBUG) { - $r->log_reason($message); + $log->debug($message); } } =pod -=item checksuffix($old, $new) - - Determine if a resource filename suffix (the stuff after the .) would change -as a result of this operation. - - Parameters: - -=over 4 - -=item $old = string [in] Previous filename. - -=item $new = string [in] Resultant filename. - -=back - -=cut - -=pod - =item URLToPath($url) Convert a URL to a file system path. @@ -717,7 +698,6 @@ sub phaseone { my $newfilename=&cleanDest($r,$ENV{'form.newfilename'}); $newfilename=&relativeDest($fn,$newfilename,$uname); - &Debug($r, "Newfile: $newfilename"); $r->print('
'. ''. ''. @@ -728,7 +708,6 @@ sub phaseone { } elsif ($ENV{'form.action'} eq 'delete') { &Delete1($r, $uname, $udom, $fn); } elsif ($ENV{'form.action'} eq 'decompress') { - &Apache::lonnet::appenv('cgi.path' => $newfilename); &Decompress1($r, $uname, $udom, $fn); } elsif ($ENV{'form.action'} eq 'copy') { if($newfilename) { @@ -1114,6 +1093,7 @@ sub handler { $fn=&Apache::lonnet::unescape($ENV{'form.filename'}); $fn=&URLToPath($fn); } + #Just hijack the script only the first time around to inject the correct information for further processing elsif($ENV{'QUERY_STRING'} && $ENV{'form.phase'} ne 'two') { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['decompress']); $fn=&Apache::lonnet::unescape($ENV{'form.decompress'});