SettingCompression.php 625 B

123456789101112131415161718192021
  1. <?php
  2. namespace dokuwiki\plugin\config\core\Setting;
  3. /**
  4. * Class setting_compression
  5. */
  6. class SettingCompression extends SettingMultichoice {
  7. protected $choices = array('0'); // 0 = no compression, always supported
  8. /** @inheritdoc */
  9. public function initialize($default = null, $local = null, $protected = null) {
  10. // populate _choices with the compression methods supported by this php installation
  11. if(function_exists('gzopen')) $this->choices[] = 'gz';
  12. if(function_exists('bzopen')) $this->choices[] = 'bz2';
  13. parent::initialize($default, $local, $protected);
  14. }
  15. }