--- loncom/publisher/loncfile.pm 2003/11/08 10:48:33 1.43 +++ loncom/publisher/loncfile.pm 2003/11/19 14:57:32 1.44 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.43 2003/11/08 10:48:33 albertel Exp $ +# $Id: loncfile.pm,v 1.44 2003/11/19 14:57:32 taceyjo1 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,7 +73,7 @@ use Apache::Log (); use Apache::lonnet; use Apache::loncommon(); -my $DEBUG=0; +my $DEBUG=2; my $r; # Needs to be global for some stuff RF. =pod @@ -110,12 +110,31 @@ sub Debug { # Put out the indicated message butonly if DEBUG is true. if ($DEBUG) { - $log->debug($message); + $r->log_reason($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. @@ -579,6 +598,17 @@ sub NewDir1 } } + +sub Decompress1 { + my ($request, $user, $domain, $fn) = @_; + if( -e $fn) { + $request->print(''); + $request->print('
Decompress '.&display($fn).'?
'); + &CloseForm1($request, $fn); + } else { + $request->print('No such file: '.&display($fn).'
'); + } +} =pod =item NewFile1 @@ -687,7 +717,7 @@ sub phaseone { my $newfilename=&cleanDest($r,$ENV{'form.newfilename'}); $newfilename=&relativeDest($fn,$newfilename,$uname); - + &Debug($r, "Newfile: $newfilename"); $r->print('