mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10110] Remove multi-server syntax from Redis ACM.
PHPBB3-10110
This commit is contained in:
parent
065bcde662
commit
b9f4240c10
1 changed files with 1 additions and 11 deletions
|
@ -31,12 +31,6 @@ if (!defined('PHPBB_ACM_REDIS_HOST'))
|
||||||
define('PHPBB_ACM_REDIS_HOST', 'localhost');
|
define('PHPBB_ACM_REDIS_HOST', 'localhost');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!defined('PHPBB_ACM_REDIS'))
|
|
||||||
{
|
|
||||||
//can define multiple servers with host1/port1,host2/port2 format
|
|
||||||
define('PHPBB_ACM_REDIS', PHPBB_ACM_REDIS_HOST . '/' . PHPBB_ACM_REDIS_PORT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ACM for Redis
|
* ACM for Redis
|
||||||
*
|
*
|
||||||
|
@ -57,11 +51,7 @@ class acm extends acm_memory
|
||||||
parent::acm_memory();
|
parent::acm_memory();
|
||||||
|
|
||||||
$this->redis = new Redis();
|
$this->redis = new Redis();
|
||||||
foreach (explode(',', PHPBB_ACM_REDIS) as $server)
|
$this->redis->connect(PHPBB_ACM_REDIS_HOST, PHPBB_ACM_REDIS_PORT);
|
||||||
{
|
|
||||||
$parts = explode('/', $server);
|
|
||||||
$this->redis->connect(trim($parts[0]), trim($parts[1]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (defined('PHPBB_ACM_REDIS_PASSWORD'))
|
if (defined('PHPBB_ACM_REDIS_PASSWORD'))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue