diff options
-rw-r--r-- | system/helpers/form_helper.php | 2 | ||||
-rw-r--r-- | system/libraries/Cache/drivers/Cache_redis.php | 8 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php index 8825ecc2c..aa7379f77 100644 --- a/system/helpers/form_helper.php +++ b/system/helpers/form_helper.php @@ -100,7 +100,7 @@ if ( ! function_exists('form_open')) { foreach ($hidden as $name => $value) { - $form .= '<input type="hidden" name="'.$name.'" value="'.html_escape($value).'" style="display:none;" />'."\n"; + $form .= '<input type="hidden" name="'.$name.'" value="'.html_escape($value).'" />'."\n"; } } diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index ec4432437..2d1ead452 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -58,7 +58,8 @@ class CI_Cache_redis extends CI_Driver 'host' => '127.0.0.1', 'password' => NULL, 'port' => 6379, - 'timeout' => 0 + 'timeout' => 0, + 'database' => 0 ); /** @@ -113,6 +114,11 @@ class CI_Cache_redis extends CI_Driver { log_message('error', 'Cache: Redis authentication failed.'); } + + if (isset($config['database']) && $config['database'] > 0 && ! $this->_redis->select($config['database'])) + { + log_message('error', 'Cache: Redis select database failed.'); + } } catch (RedisException $e) { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 35dc76476..484e6a13b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -18,6 +18,7 @@ Release Date: Not Released - :doc:`Cache Library <libraries/caching>` changes include: - Added UNIX socket connection support to the 'memcached' driver. + - Added 'database' configuration option to the 'redis' driver, allowing to auto-select another database. - Changed the 'memcached' driver to ignore configurations that don't specify a hostname. - Removed the *socket_type* configuration setting from the 'redis' driver. - Changed data serialization logic in 'redis' driver for better performance. |