FTP: ensure that there is only one class named `ftp`, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files.

See #36335.

Built from https://develop.svn.wordpress.org/trunk@38380


git-svn-id: http://core.svn.wordpress.org/trunk@38321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2016-08-26 18:47:29 +00:00
parent b1c6049be4
commit 11216c7069
4 changed files with 10 additions and 12 deletions

View File

@ -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);
}
// <!-- --------------------------------------------------------------------------------------- -->
// <!-- Private functions -->
// <!-- --------------------------------------------------------------------------------------- -->

View File

@ -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);
}
// <!-- --------------------------------------------------------------------------------------- -->
// <!-- Private functions -->
// <!-- --------------------------------------------------------------------------------------- -->

View File

@ -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 {}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38379';
$wp_version = '4.7-alpha-38380';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.