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