compression fallback

This updates the availability check of the choosen compression method. If bzip2
is configured but not available it falls back to gzip if available.

darcs-hash:20060825144739-7ad00-9f7ce54fd1dbf0d7a8272393e9bc02d862b28fff.gz
This commit is contained in:
Andreas Gohr 2006-08-25 16:47:39 +02:00
parent ff3ed99f17
commit 501252a5b9
1 changed files with 5 additions and 2 deletions

View File

@ -94,8 +94,11 @@
@ini_set('magic_quotes_sybase',0);
// disable gzip if not available
if($conf['usegzip'] && !function_exists('gzopen')){
$conf['usegzip'] = 0;
if($conf['compression'] == 'bzip2' && !function_exists('bzopen')){
$conf['compression'] = 'gzip';
}
if($conf['compression'] == 'gzip' && !function_exists('gzopen')){
$conf['compression'] = 0;
}
// precalculate file creation modes