Make WordPress Core

Changeset 38380


Ignore:
Timestamp:
08/26/2016 06:46:17 PM (8 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-admin/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-ftp-pure.php

    r34281 r38380  
    2626 * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
    2727 */
    28 class ftp extends ftp_base {
     28class ftp_pure extends ftp_base {
    2929
    3030    function __construct($verb=FALSE, $le=FALSE) {
    3131        parent::__construct(false, $verb, $le);
    32     }
    33 
    34     function ftp($verb=FALSE, $le=FALSE) {
    35         $this->__construct($verb, $le);
    3632    }
    3733
  • trunk/src/wp-admin/includes/class-ftp-sockets.php

    r34281 r38380  
    2626 * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
    2727 */
    28 class ftp extends ftp_base {
     28class ftp_sockets extends ftp_base {
    2929
    3030    function __construct($verb=FALSE, $le=FALSE) {
    3131        parent::__construct(true, $verb, $le);
    32     }
    33 
    34     function ftp($verb=FALSE, $le=FALSE) {
    35         $this->__construct($verb, $le);
    3632    }
    3733
  • trunk/src/wp-admin/includes/class-ftp.php

    r35946 r38380  
    819819        $sensitive=(PHP_OS!='WIN32');
    820820        return ($sensitive?
    821             preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : 
     821            preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) :
    822822            preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe )
    823823        );
     
    905905
    906906require_once dirname( __FILE__ ) . "/class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
     907
     908if ( $mod_sockets ) {
     909    class ftp extends ftp_sockets {}
     910} else {
     911    class ftp extends ftp_pure {}
     912}
Note: See TracChangeset for help on using the changeset viewer.