Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Commit

Permalink
Fix Redis Test #430
Browse files Browse the repository at this point in the history
  • Loading branch information
Furniel authored and szepeviktor committed May 5, 2017
1 parent 06f283c commit ed5d537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Generic_AdminActions_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function w3tc_test_memcached() {
*/
function w3tc_test_redis() {
$servers = Util_Request::get_array( 'servers' );
$persistent = Util_Request::get_boolean( 'persistent', false );
$password = Util_Request::get_string('password', '');
$dbid = Util_Request::get_integer( 'dbid', 0 );

if ( count( $servers ) <= 0 )
$success = false;
Expand All @@ -48,7 +51,9 @@ function w3tc_test_redis() {
foreach ( $servers as $server ) {
@$cache = Cache::instance( 'redis', array(
'servers' => $server,
'persistent' => false
'persistent' => $persistent,
'password' => $password,
'dbid' => $dbid
) );
if ( is_null( $cache ) )
$success = false;
Expand Down
3 changes: 3 additions & 0 deletions pub/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,9 @@ jQuery(function() {
jQuery.post('admin.php?page=w3tc_dashboard', {
w3tc_test_redis: 1,
servers: jQuery('#redis_servers').val(),
persistent : jQuery('#objectcache__redis__persistent').is(':checked'),
dbid : jQuery('#redis_dbid').val(),
password : jQuery('#redis_password').val(),
_wpnonce: jQuery(this).metadata().nonce
}, function(data) {
status.addClass(data.result ? 'w3tc-success' : 'w3tc-error');
Expand Down

0 comments on commit ed5d537

Please sign in to comment.