WordPress.org

Plugin Directory

Changeset 439809


Ignore:
Timestamp:
09/18/11 22:14:13 (3 years ago)
Author:
TerraFrost
Message:
  • only include phpseclib when it's necessary (thanks dd32!)
  • copy() didn't include a parameter for the $mode
Location:
ssh-sftp-updater-support/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ssh-sftp-updater-support/trunk/class-wp-filesystem-ssh2.php

    r433792 r439809  
    203203    } 
    204204 
    205     function copy($source, $destination, $overwrite = false ) { 
     205    function copy($source, $destination, $overwrite = false, $mode = false) { 
    206206        if ( ! $overwrite && $this->exists($destination) ) 
    207207            return false; 
     
    209209        if ( false === $content) 
    210210            return false; 
    211         return $this->put_contents($destination, $content); 
     211        return $this->put_contents($destination, $content, $mode); 
    212212    } 
    213213 
  • ssh-sftp-updater-support/trunk/sftp.php

    r433792 r439809  
    99*/ 
    1010 
    11 set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/phpseclib/'); 
    12  
    13 require_once('Net/SFTP.php'); 
    14 require_once('Crypt/RSA.php'); 
    15  
    1611// see http://adambrown.info/p/wp_hooks/hook/<filter name> 
    17 //add_filter('fs_ftp_connection_types', 'phpseclib_fs_ftp_connection_types'); // since 2.9 
    18 add_action('filesystem_method', 'phpseclib_filesystem_method', 10, 2); // since 2.6 
    19 add_action('request_filesystem_credentials', 'phpseclib_request_filesystem_credentials', 10, 6); // since 2.5 
    20 add_action('fs_ftp_connection_types', 'phpseclib_fs_ftp_connection_types'); // since 2.9 
    21 add_action('filesystem_method_file', 'phpseclib_filesystem_method_file', 10, 2); // since 2.6 
     12add_filter('filesystem_method', 'phpseclib_filesystem_method', 10, 2); // since 2.6 - WordPress will ignore the ssh option if the php ssh extension is not loaded 
     13add_filter('request_filesystem_credentials', 'phpseclib_request_filesystem_credentials', 10, 6); // since 2.5 - Alter some strings and don't ask for the public key 
     14add_filter('fs_ftp_connection_types', 'phpseclib_fs_ftp_connection_types'); // since 2.9 - Add the SSH2 option to the connection options 
     15add_filter('filesystem_method_file', 'phpseclib_filesystem_method_file', 10, 2); // since 2.6 - Direct WordPress to use our ssh2 class 
    2216 
    2317function phpseclib_filesystem_method_file($path, $method) { 
Note: See TracChangeset for help on using the changeset viewer.