import an incredibly useful debugging tool from 2.3
authorMark Wells <mark@freeside.biz>
Fri, 1 Mar 2013 04:31:12 +0000 (20:31 -0800)
committerMark Wells <mark@freeside.biz>
Fri, 1 Mar 2013 04:31:44 +0000 (20:31 -0800)
FS/FS/Misc.pm
httemplate/pref/pref-process.html
httemplate/pref/pref.html

index 5e89abc..de9fb52 100644 (file)
@@ -699,7 +699,8 @@ sub generate_ps {
   open(POSTSCRIPT, "<$file.ps")
     or die "can't open $file.ps: $! (error in LaTeX template?)\n";
 
-  unlink("$file.dvi", "$file.log", "$file.aux", "$file.ps", "$file.tex");
+  unlink("$file.dvi", "$file.log", "$file.aux", "$file.ps", "$file.tex")
+    unless $FS::CurrentUser::CurrentUser->option('save_tmp_typesetting');
 
   my $ps = '';
 
@@ -757,7 +758,8 @@ sub generate_pdf {
   open(PDF, "<$file.pdf")
     or die "can't open $file.pdf: $! (error in LaTeX template?)\n";
 
-  unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex");
+  unlink("$file.dvi", "$file.log", "$file.aux", "$file.pdf", "$file.tex")
+    unless $FS::CurrentUser::CurrentUser->option('save_tmp_typesetting');
 
   my $pdf = '';
   while (<PDF>) {
index c4fef03..84f0832 100644 (file)
@@ -57,7 +57,7 @@ unless ( $error ) { # if ($access_user) {
                       vonage-fromnumber vonage-username vonage-password
                       cust_pkg-display_times
                       show_pkgnum show_confitem_counts export_getsettings
-                      show_db_profile save_db_profile
+                      show_db_profile save_db_profile save_tmp_typesetting
                       height width availHeight availWidth colorDepth
                     );
 
index 1e9671d..9537fed 100644 (file)
@@ -157,6 +157,10 @@ Development
     <TH>Save database profiling logs (when available): </TH>
     <TD><INPUT TYPE="checkbox" NAME="save_db_profile" VALUE="1" <% $curuser->option('save_db_profile') ? 'CHECKED' : '' %>></TD>
   </TR>
+  <TR>
+    <TH>Save temporary invoice typesetting files: </TH>
+    <TD><INPUT TYPE="checkbox" NAME="save_tmp_typesetting" VALUE="1" <% $curuser->option('save_tmp_typesetting') ? 'CHECKED' : '' %>></TD>
+  </TR>
 
 </TABLE>
 <BR>