Skip to content

Commit

Permalink
MDL-58311 cachestore_redis: Set password correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 12, 2017
1 parent 8168bfd commit 30829b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cache/stores/redis/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ public static function config_get_configuration_array($data) {
return array(
'server' => $data->server,
'prefix' => $data->prefix,
'password' => $data->password,
'serializer' => $data->serializer
);
}
Expand All @@ -459,6 +460,7 @@ public static function config_set_edit_form_data(moodleform $editform, array $co
$data = array();
$data['server'] = $config['server'];
$data['prefix'] = !empty($config['prefix']) ? $config['prefix'] : '';
$data['password'] = !empty($config['password']) ? $config['password'] : '';
if (!empty($config['serializer'])) {
$data['serializer'] = $config['serializer'];
}
Expand All @@ -484,6 +486,9 @@ public static function initialise_test_instance(cache_definition $definition) {
if (!empty($config->test_serializer)) {
$configuration['serializer'] = $config->test_serializer;
}
if (!empty($config->test_password)) {
$configuration['password'] = $config->test_password;
}
$cache = new cachestore_redis('Redis test', $configuration);
$cache->initialise($definition);

Expand Down

0 comments on commit 30829b5

Please sign in to comment.