Browse files

fix for download filename, filesize, and contents pointing to non-exi…

…stent file
  • Loading branch information...
1 parent 082c079 commit 4e09d30457b91fd8ff834cb8728b848a1509f0b9 @benbalter benbalter committed Aug 13, 2012
Showing with 4 additions and 3 deletions.
  1. +3 −3 includes/generate.php
  2. +1 −0
6 includes/generate.php
@@ -76,11 +76,11 @@
//send headers
header( 'Content-Type: application/zip' );
-header( "Content-Disposition: attachment; filename=$zipfile" );
-header( 'Content-Length: ' . filesize( $zip ) );
+header( "Content-Disposition: attachment; filename=$filename" );
+header( 'Content-Length: ' . filesize( "{$dir}/$filename" ) );
//read file
-readfile( $zip );
+readfile( "{$dir}/$filename" );
//Check for a value in the report directory constant
//if it exists, move the files into the report directory for easy access before clearing the scratch directory
@@ -54,6 +54,7 @@ Changelog
### 1.1 ###
* Better PHP 5.4 compatability (removed calltime pass by reference)
* Added option to write generated file to web server for easier programatic access (props [Bill Severe](
+* Auto-import and propegation of generated values if report directory is set in config file (props [Bill Severe](
* Uses PHP's default temporary directory, rather than the `tmp/` folder within the project to generate files, simplifying installation and improving portability (props [Bill Severe](
* Moved configuration to separate file to simplifying customization
* Better sorting of agencies and action items in datafiles and in the generator (props [Bill Severe](

0 comments on commit 4e09d30

Please sign in to comment.