Changeset 10919 for trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
- Timestamp:
- 04/13/2009 04:11:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r10150 r10919 170 170 function getchmod($file) { 171 171 $dir = $this->dirlist($file); 172 return $ dir[$file]['permsn'];172 return $this->getnumchmodfromh( $dir[basename($file)]['perms'] ); 173 173 } 174 174 function group($file) { … … 188 188 } 189 189 190 function delete($file,$recursive=false) { 190 function delete($file ,$recursive = false ) { 191 if ( empty($file) ) 192 return false; 191 193 if ( $this->is_file($file) ) 192 194 return @ftp_delete($this->link, $file); … … 322 324 323 325 function dirlist($path = '.', $incdot = false, $recursive = false) { 324 if( $this->is_file($path) ) { 325 $limitFile = basename($path); 326 $path = dirname($path) . '/'; 326 327 if ( substr($path, -1) !== '/') { 328 $limit = basename($path); 329 $path = trailingslashit(dirname($path)); 327 330 } else { 328 $limit File= false;331 $limit = false; 329 332 } 330 333 … … 340 343 continue; 341 344 342 if ( '.' == $entry["name"] || '..' == $entry["name"] ) 345 if ( '.' == $entry['name'] || '..' == $entry['name'] ) 346 continue; 347 348 if ( $limit && $entry['name'] != $limit ) 343 349 continue; 344 350
Note: See TracChangeset
for help on using the changeset viewer.