[LON-CAPA-cvs] cvs: loncom /interface printout.pl

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 11 Feb 2004 00:19:49 -0000


albertel		Tue Feb 10 19:19:49 2004 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - fixes the effects of BUG#2538, once we have gotten what we want out of the session ENV, throw it away, then the system() calls are fine
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.45 loncom/interface/printout.pl:1.46
--- loncom/interface/printout.pl:1.45	Fri Feb  6 09:16:39 2004
+++ loncom/interface/printout.pl	Tue Feb 10 19:19:49 2004
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.45 2004/02/06 14:16:39 sakharuk Exp $
+# $Id: printout.pl,v 1.46 2004/02/11 00:19:49 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use IO::File;
 use Image::Magick;
 
+my %origENV=%ENV;
 if (! &LONCAPA::loncgi::check_cookie_and_load_env()) {
     print <<END;
 Content-type: text/html
@@ -66,6 +67,8 @@
   if ($student_names=~/_END_/) {  
       @names_pack=split(/_ENDPERSON_/,$student_names);
   }
+  #got what we needed reset ENV in case it is to big for system
+  %ENV=%origENV;
 
   my $figfile = $texfile;
   $figfile =~ s/^([^\.]+printout)[^t]+\.tex/$1\.dat/;