diff options
author | David M <davidmj@users.sourceforge.net> | 2007-02-17 03:20:14 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2007-02-17 03:20:14 +0000 |
commit | 4a83eb22da3b576a1feaf9bd1e021068d0a310bd (patch) | |
tree | 17e4375f2e15a45882971032faa2f091f7672840 /phpBB/includes/acp/acp_database.php | |
parent | e526dfe83e805e8ffac5abcab0ba2fc67c7563ce (diff) | |
download | forums-4a83eb22da3b576a1feaf9bd1e021068d0a310bd.tar forums-4a83eb22da3b576a1feaf9bd1e021068d0a310bd.tar.gz forums-4a83eb22da3b576a1feaf9bd1e021068d0a310bd.tar.bz2 forums-4a83eb22da3b576a1feaf9bd1e021068d0a310bd.tar.xz forums-4a83eb22da3b576a1feaf9bd1e021068d0a310bd.zip |
- finally fixed this one, IE has a bug that makes puppies cry.
git-svn-id: file:///svn/phpbb/trunk@6997 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_database.php')
-rw-r--r-- | phpBB/includes/acp/acp_database.php | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index ed1dab4fd8..b122f15f8f 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -504,6 +504,7 @@ class base_extractor var $download; var $time; var $format; + var $run_comp = false; function base_extractor($download = false, $store = false, $format, $filename, $time) { @@ -551,7 +552,14 @@ class base_extractor break; case 'gzip': - ob_start('ob_gzhandler'); + if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false) + { + ob_start('ob_gzhandler'); + } + else + { + $this->run_comp = true; + } break; } } @@ -604,12 +612,23 @@ class base_extractor if ($this->download === true) { - echo $data; + if ($this->format === 'bzip2' || ($this->format === 'gzip' && !$this->run_comp)) + { + echo $data; + } // we can write the gzip data as soon as we get it if ($this->format === 'gzip') { - ob_flush(); + if ($this->run_comp) + { + echo gzencode($data); + } + else + { + ob_flush(); + flush(); + } } } } |