diff options
author | David M <davidmj@users.sourceforge.net> | 2006-03-18 06:39:47 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-03-18 06:39:47 +0000 |
commit | 593ab697a0be41b0b04d64b00e8e3ec767a9f083 (patch) | |
tree | 76e215420d011b516e0386b55a2ae36316e0e59a /phpBB/includes/functions_compress.php | |
parent | f2cc5c093dd6a040d7a6ef6a4358dbfe0b70ff88 (diff) | |
download | forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.gz forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.bz2 forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.tar.xz forums-593ab697a0be41b0b04d64b00e8e3ec767a9f083.zip |
- Cleaned up some compress stuff
- Replaced deprecated functions in the PostrgreSQL DBAL
- Added an undefined constant during install
- Oh, and we now have backups :D We currently work with all the MySQL flavors, PostgreSQL and SQLite...
git-svn-id: file:///svn/phpbb/trunk@5647 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_compress.php')
-rw-r--r-- | phpBB/includes/functions_compress.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index b12a81a04d..55036b130d 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -81,6 +81,7 @@ class compress function add_data($src, $name) { + $stat = array(); $stat[2] = 436; //384 $stat[4] = $stat[5] = 0; $stat[7] = strlen($src); @@ -543,15 +544,15 @@ class compress_tar extends compress switch ($this->type) { - case 'tar': + case '.tar': $mimetype = 'application/x-tar'; break; - case 'tar.gz': + case '.tar.gz': $mimetype = 'application/x-gzip'; break; - case 'tar.bz2': + case '.tar.bz2': $mimetype = 'application/x-bzip2'; break; @@ -561,10 +562,10 @@ class compress_tar extends compress } header('Pragma: no-cache'); - header("Content-Type: $mimetype; name=\"$filename.$this->type\""); - header("Content-disposition: attachment; filename=$filename.$this->type"); + header("Content-Type: $mimetype; name=\"$filename$this->type\""); + header("Content-disposition: attachment; filename=$filename$this->type"); - $fp = fopen("{$phpbb_root_path}store/$filename.$this->type", 'rb'); + $fp = fopen("{$phpbb_root_path}store/$filename$this->type", 'rb'); while ($buffer = fread($fp, 1024)) { echo $buffer; |