diff options
author | Chris Smith <chris@jalakai.co.uk> | 2007-08-05 21:36:38 +0200 |
---|---|---|
committer | Chris Smith <chris@jalakai.co.uk> | 2007-08-05 21:36:38 +0200 |
commit | 1b95bfdf531bcebc21db63c41394692b813cbd71 (patch) | |
tree | 9aec22b0849153e08ca2fd49a6dad57858e9b3ce /lib/plugins/config/settings/extra.class.php | |
parent | 2bb0d5419919bf72dd2338b331ea1a4c40ec6cbc (diff) | |
download | rpg-1b95bfdf531bcebc21db63c41394692b813cbd71.tar.gz rpg-1b95bfdf531bcebc21db63c41394692b813cbd71.tar.bz2 |
Add checks for supported attic compression methods to config plugin (FS#1185)
darcs-hash:20070805193638-d26fc-aac3910d4dea3cd5539572cce3e73366ed39ab80.gz
Diffstat (limited to 'lib/plugins/config/settings/extra.class.php')
-rw-r--r-- | lib/plugins/config/settings/extra.class.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index af97d85a8..42cbe64f8 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -98,3 +98,19 @@ if (!class_exists('setting_disableactions')) { } } } + +if (!class_exists('setting_compression')) { + class setting_compression extends setting_multichoice { + + var $_choices = array('0'); // 0 = no compression, always supported + + function initialize($default,$local,$protected) { + + // populate _choices with the compression methods supported by this php installation + if (function_exists('gzopen')) $this->_choices[] = 'gz'; + if (function_exists('bzopen')) $this->_choices[] = 'bzip'; + + parent::initialize($default,$local,$protected); + } + } +} |