Skip to content

Commit

Permalink
Improve check for horde_lz4/lzf (Request #14693).
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Sep 25, 2017
1 parent a4426c8 commit 650f33e
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions horde/lib/Test.php
Expand Up @@ -105,9 +105,10 @@ class Horde_Test
'error' => 'Horde will not run without the hash extension. Don\'t compile PHP with <code>--disable-all/--disable-hash</code>.',
'fatal' => true
),
'horde_lz4' => array(
'descrip' => 'LZ4 Compression Support (PECL extension)',
'error' => 'If the horde_lz4 PECL extension is available, Horde can perform real-time compression on cached data to optimize storage resources.'
'horde_lz4/lzf' => array(
'descrip' => 'LZ4/LZF Compression Support (PECL extension)',
'error' => 'If the horde_lz4 or lzf PECL extensions are available, Horde can perform real-time compression on cached data to optimize storage resources. It is recommended to use horde_lz4, as its compression speed is twice as fast as the lzf extension\'s.',
'function' => '_checkLzCompression'
),
'iconv' => array(
'descrip' => 'Iconv Support',
Expand All @@ -131,22 +132,18 @@ class Horde_Test
'descrip' => 'LDAP Support',
'error' => 'LDAP support is only required if you want to use an LDAP server for anything like authentication, address books, or preference storage. Compile PHP with <code>--with-ldap</code> to activate the extension.'
),
'lzf' => array(
'descrip' => 'LZF Compression Support (PECL extension)',
'error' => 'If the lzf PECL extension is available, Horde can perform real-time compression on cached data to optimize storage resources. It is recommended to use horde_lz4 instead, as its compression speed is twice as fast as this extension.'
),
'mbstring' => array(
'descrip' => 'Mbstring Support',
'error' => 'If you want to take full advantage of Horde\'s localization features and character set support, you will need the mbstring extension. Compile PHP with <code>--enable-mbstring</code> to activate the extension.'
),
'memcache' => array(
'memcached' => array(
'descrip' => 'Memcached Support (PECL extension)',
'error' => 'The memcache(d) PECL extension is only needed if you are using a Memcached server for caching or sessions. See horde/docs/INSTALL for information on how to install PECL/PHP extensions.',
'function' => '_checkMemcache'
),
'mongo' => array(
'mongodb' => array(
'descrip' => 'MongoDB support (PECL extension)',
'error' => 'If you want to use the MongoDB NoSQL database backend, you must install this extension.',
'error' => 'If you want to use the MongoDB NoSQL database backend, you must install the mongo(db) extension.',
'function' => '_checkMongo'
),
'mysql' => array(
Expand Down Expand Up @@ -458,6 +455,16 @@ public function phpModuleCheck()
return $output;
}

/**
* Check for either horde_lz4 or lzf.
*
* @return boolean False on error.
*/
protected function _checkLzCompression()
{
return extension_loaded('horde_lz4') || extension_loaded('lzf');
}

/**
* Additional check for iconv module implementation.
*
Expand Down

0 comments on commit 650f33e

Please sign in to comment.