Make WordPress Core


Ignore:
Timestamp:
03/22/2011 12:04:15 AM (14 years ago)
Author:
dd32
Message:

Optimisations to WP_Filesystem; Pass known information to called functions. Props aldenta (John Ford) for investigation and patch. See #10913

File:
1 edited

Legend:

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

    r13770 r17525  
    194194    }
    195195
    196     function copy($source, $destination, $overwrite = false ) {
     196    function copy($source, $destination, $overwrite = false, $mode = false) {
    197197        if ( ! $overwrite && $this->exists($destination) )
    198198            return false;
     
    202202            return false;
    203203
    204         return $this->put_contents($destination, $content);
     204        return $this->put_contents($destination, $content, $mode);
    205205    }
    206206
     
    209209    }
    210210
    211     function delete($file, $recursive = false ) {
     211    function delete($file, $recursive = false, $type = false) {
    212212        if ( empty($file) )
    213213            return false;
    214         if ( $this->is_file($file) )
     214        if ( 'f' == $type || $this->is_file($file) )
    215215            return $this->ftp->delete($file);
    216216        if ( !$recursive )
Note: See TracChangeset for help on using the changeset viewer.