diff --git a/src/wp-admin/includes/class-ftp-pure.php b/src/wp-admin/includes/class-ftp-pure.php index 28e56779f9..38d348badf 100644 --- a/src/wp-admin/includes/class-ftp-pure.php +++ b/src/wp-admin/includes/class-ftp-pure.php @@ -25,16 +25,12 @@ * @link http://www.phpclasses.org/browse/package/1743.html Site * @license LGPL http://www.opensource.org/licenses/lgpl-license.html */ -class ftp extends ftp_base { +class ftp_pure extends ftp_base { function __construct($verb=FALSE, $le=FALSE) { parent::__construct(false, $verb, $le); } - function ftp($verb=FALSE, $le=FALSE) { - $this->__construct($verb, $le); - } - // // // diff --git a/src/wp-admin/includes/class-ftp-sockets.php b/src/wp-admin/includes/class-ftp-sockets.php index c71205e921..5ca4a2b579 100644 --- a/src/wp-admin/includes/class-ftp-sockets.php +++ b/src/wp-admin/includes/class-ftp-sockets.php @@ -25,16 +25,12 @@ * @link http://www.phpclasses.org/browse/package/1743.html Site * @license LGPL http://www.opensource.org/licenses/lgpl-license.html */ -class ftp extends ftp_base { +class ftp_sockets extends ftp_base { function __construct($verb=FALSE, $le=FALSE) { parent::__construct(true, $verb, $le); } - function ftp($verb=FALSE, $le=FALSE) { - $this->__construct($verb, $le); - } - // // // diff --git a/src/wp-admin/includes/class-ftp.php b/src/wp-admin/includes/class-ftp.php index de6a29966a..35f670ff38 100644 --- a/src/wp-admin/includes/class-ftp.php +++ b/src/wp-admin/includes/class-ftp.php @@ -818,7 +818,7 @@ class ftp_base { function glob_regexp($pattern,$probe) { $sensitive=(PHP_OS!='WIN32'); return ($sensitive? - preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : + preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe ) ); } @@ -904,3 +904,9 @@ if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) { } require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php"; + +if ( $mod_sockets ) { + class ftp extends ftp_sockets {} +} else { + class ftp extends ftp_pure {} +}