[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm

taceyjo1 lon-capa-cvs@mail.lon-capa.org
Wed, 19 Nov 2003 15:06:33 -0000


taceyjo1		Wed Nov 19 10:06:33 2003 EDT

  Modified files:              
    /loncom/publisher	loncfile.pm 
  Log:
  Whoops, forgot to remove some debugging information, it pollutes the log less now
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.44 loncom/publisher/loncfile.pm:1.45
--- loncom/publisher/loncfile.pm:1.44	Wed Nov 19 09:57:32 2003
+++ loncom/publisher/loncfile.pm	Wed Nov 19 10:06:33 2003
@@ -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::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 @@
   # 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 @@
   
   my $newfilename=&cleanDest($r,$ENV{'form.newfilename'});
   $newfilename=&relativeDest($fn,$newfilename,$uname);
-	&Debug($r, "Newfile: $newfilename");
   $r->print('<form action="/adm/cfile" method="post">'.
       '<input type="hidden" name="qualifiedfilename" value="'.$fn.'" />'.
       '<input type="hidden" name="phase" value="two" />'.
@@ -728,7 +708,6 @@
   } 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 @@
       $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'});