- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r15086 r17771 20 20 var $options = array(); 21 21 22 function WP_Filesystem_FTPext($opt='') {22 function __construct($opt='') { 23 23 $this->method = 'ftpext'; 24 24 $this->errors = new WP_Error(); … … 184 184 return $dir[$file]['group']; 185 185 } 186 function copy($source, $destination, $overwrite = false 186 function copy($source, $destination, $overwrite = false, $mode = false) { 187 187 if ( ! $overwrite && $this->exists($destination) ) 188 188 return false; … … 190 190 if ( false === $content) 191 191 return false; 192 return $this->put_contents($destination, $content );192 return $this->put_contents($destination, $content, $mode); 193 193 } 194 194 function move($source, $destination, $overwrite = false) { … … 196 196 } 197 197 198 function delete($file, $recursive = false 198 function delete($file, $recursive = false, $type = false) { 199 199 if ( empty($file) ) 200 200 return false; 201 if ( $this->is_file($file) )201 if ( 'f' == $type || $this->is_file($file) ) 202 202 return @ftp_delete($this->link, $file); 203 203 if ( !$recursive ) … … 207 207 if ( !empty($filelist) ) 208 208 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'] ); 210 210 return @ftp_rmdir($this->link, $file); 211 211 }
Note: See TracChangeset
for help on using the changeset viewer.