diff options
author | Andreas Gohr <andi@splitbrain.org> | 2006-08-25 16:47:39 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2006-08-25 16:47:39 +0200 |
commit | 501252a5b9cc519c5b82ee6eadc26f6b2206fbab (patch) | |
tree | f3bdd116939f0fb9c054fde7e1b1b6197f42e938 /inc/init.php | |
parent | ff3ed99f17e6204cc4f6331830c53a084f385d9a (diff) | |
download | rpg-501252a5b9cc519c5b82ee6eadc26f6b2206fbab.tar.gz rpg-501252a5b9cc519c5b82ee6eadc26f6b2206fbab.tar.bz2 |
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
Diffstat (limited to 'inc/init.php')
-rw-r--r-- | inc/init.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/init.php b/inc/init.php index 783d3d9c4..b6fdc0e73 100644 --- a/inc/init.php +++ b/inc/init.php @@ -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 |