Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ftpext.php

    r15086 r17771  
    2020    var $options = array();
    2121
    22     function WP_Filesystem_FTPext($opt='') {
     22    function __construct($opt='') {
    2323        $this->method = 'ftpext';
    2424        $this->errors = new WP_Error();
     
    184184        return $dir[$file]['group'];
    185185    }
    186     function copy($source, $destination, $overwrite = false ) {
     186    function copy($source, $destination, $overwrite = false, $mode = false) {
    187187        if ( ! $overwrite && $this->exists($destination) )
    188188            return false;
     
    190190        if ( false === $content)
    191191            return false;
    192         return $this->put_contents($destination, $content);
     192        return $this->put_contents($destination, $content, $mode);
    193193    }
    194194    function move($source, $destination, $overwrite = false) {
     
    196196    }
    197197
    198     function delete($file, $recursive = false ) {
     198    function delete($file, $recursive = false, $type = false) {
    199199        if ( empty($file) )
    200200            return false;
    201         if ( $this->is_file($file) )
     201        if ( 'f' == $type || $this->is_file($file) )
    202202            return @ftp_delete($this->link, $file);
    203203        if ( !$recursive )
     
    207207        if ( !empty($filelist) )
    208208            foreach ( $filelist as $delete_file )
    209                 $this->delete( trailingslashit($file) . $delete_file['name'], $recursive);
     209                $this->delete( trailingslashit($file) . $delete_file['name'], $recursive, $delete_file['type'] );
    210210        return @ftp_rmdir($this->link, $file);
    211211    }
Note: See TracChangeset for help on using the changeset viewer.