Skip to content

Commit

Permalink
fix for download filename, filesize, and contents pointing to non-exi…
Browse files Browse the repository at this point in the history
…stent file
  • Loading branch information
benbalter committed Aug 13, 2012
1 parent 082c079 commit 4e09d30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/generate.php
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions readme.md
Expand Up @@ -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](https://github.com/bsevere))
* Auto-import and propegation of generated values if report directory is set in config file (props [Bill Severe](https://github.com/bsevere))
* 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](https://github.com/bsevere))
* Moved configuration to separate file to simplifying customization
* Better sorting of agencies and action items in datafiles and in the generator (props [Bill Severe](https://github.com/bsevere))
Expand Down

0 comments on commit 4e09d30

Please sign in to comment.