- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ssh2.php
r13770 r17771 49 49 var $options = array(); 50 50 51 function WP_Filesystem_SSH2($opt='') {51 function __construct($opt='') { 52 52 $this->method = 'ssh2'; 53 53 $this->errors = new WP_Error(); … … 239 239 } 240 240 241 function copy($source, $destination, $overwrite = false 241 function copy($source, $destination, $overwrite = false, $mode = false) { 242 242 if ( ! $overwrite && $this->exists($destination) ) 243 243 return false; … … 245 245 if ( false === $content) 246 246 return false; 247 return $this->put_contents($destination, $content );247 return $this->put_contents($destination, $content, $mode); 248 248 } 249 249 … … 252 252 } 253 253 254 function delete($file, $recursive = false ) {255 if ( $this->is_file($file) )254 function delete($file, $recursive = false, $type = false) { 255 if ( 'f' == $type || $this->is_file($file) ) 256 256 return ssh2_sftp_unlink($this->sftp_link, $file); 257 257 if ( ! $recursive ) … … 260 260 if ( is_array($filelist) ) { 261 261 foreach ( $filelist as $filename => $fileinfo) { 262 $this->delete($file . '/' . $filename, $recursive );262 $this->delete($file . '/' . $filename, $recursive, $fileinfo['type']); 263 263 } 264 264 }
Note: See TracChangeset
for help on using the changeset viewer.