First assign to var, then use it

This commit is contained in:
oleksandrtkachuk
2015-10-17 00:28:35 +03:00
parent 2cab5374c1
commit 8d761982c5

View File

@@ -126,12 +126,12 @@ class DirectoryLister {
} else {
// zip the stuff (dir and all in there) into the tmp_zip file
exec('zip -' . $this->_config['zip_compression_level'] . ' -r ' . $tmp_zip . ' * -x ' . $exclude_list);
// get a tmp name for the .zip
$tmp_zip = tempnam('tmp', 'tempzip') . '.zip';
// zip the stuff (dir and all in there) into the tmp_zip file
exec('zip -' . $this->_config['zip_compression_level'] . ' -r ' . $tmp_zip . ' * -x ' . $exclude_list);
// calc the length of the zip. it is needed for the progress bar of the browser
$filesize = filesize($tmp_zip);
header("Content-Length: $filesize");