Changeset 11934 for trunk/wp-admin/includes/class-wp-filesystem-ssh2.php
- Timestamp:
- 09/15/2009 02:21:00 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ssh2.php
r11930 r11934 323 323 } 324 324 325 function dirlist($path, $inc dot = false, $recursive = false) {325 function dirlist($path, $include_hidden = true, $recursive = false) { 326 326 if ( $this->is_file($path) ) { 327 $limit File = basename($path);327 $limit_file = basename($path); 328 328 $path = dirname($path); 329 329 } else { 330 $limitFile = false; 331 } 330 $limit_file = false; 331 } 332 332 333 if ( ! $this->is_dir($path) ) 333 334 return false; … … 335 336 $ret = array(); 336 337 $dir = @dir('ssh2.sftp://' . $this->sftp_link .'/' . ltrim($path, '/') ); 338 337 339 if ( ! $dir ) 338 340 return false; 341 339 342 while (false !== ($entry = $dir->read()) ) { 340 343 $struc = array(); … … 343 346 if ( '.' == $struc['name'] || '..' == $struc['name'] ) 344 347 continue; //Do not care about these folders. 345 if ( '.' == $struc['name'][0] && !$incdot) 348 349 if ( ! $include_hidden && '.' == $struc['name'][0] ) 346 350 continue; 347 if ( $limitFile && $struc['name'] != $limitFile) 351 352 if ( $limit_file && $struc['name'] != $limit_file ) 348 353 continue; 349 354 … … 361 366 if ( 'd' == $struc['type'] ) { 362 367 if ( $recursive ) 363 $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $inc dot, $recursive);368 $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $include_hidden, $recursive); 364 369 else 365 370 $struc['files'] = array();
Note: See TracChangeset
for help on using the changeset viewer.