[freeside-commits] freeside/httemplate/misc download-bill_batch.html, 1.1.2.2, 1.1.2.3

Mark Wells mark at wavetail.420.am
Mon Aug 15 19:09:55 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/misc
In directory wavetail.420.am:/tmp/cvs-serv1736/httemplate/misc

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	download-bill_batch.html 
Log Message:
reliably start batch download, #947

Index: download-bill_batch.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/download-bill_batch.html,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -w -d -r1.1.2.2 -r1.1.2.3
--- download-bill_batch.html	30 Jul 2011 23:14:23 -0000	1.1.2.2
+++ download-bill_batch.html	16 Aug 2011 02:09:53 -0000	1.1.2.3
@@ -12,10 +12,15 @@
 $r->content_type('application/pdf');
 $r->headers_out->add( 'Content-Disposition' => 
   'attachment;filename="invoice_batch_'.$batchnum.'.pdf"');
+my $cookie = CGI::Cookie->new(
+  -name => "bill_batch_download",
+  -value => $batchnum,
+  -expires => '+1d',
+);
+$r->headers_out->add( 'Set-Cookie' => $cookie->as_string );
 $m->print($content);
 
-#$batch->pdf('');
-#my $error = $batch->replace;
-#  warn "error deleting cached PDF: '$error'\n" if $error;
-#}
+$batch->pdf('');
+my $error = $batch->replace;
+warn "error deleting cached PDF: '$error'\n" if $error;
 </%init>



More information about the freeside-commits mailing list