From 593ab697a0be41b0b04d64b00e8e3ec767a9f083 Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 18 Mar 2006 06:39:47 +0000 Subject: - 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 --- phpBB/includes/functions_compress.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'phpBB/includes/functions_compress.php') 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; -- cgit v1.2.1