- Timestamp:
- 07/01/2019 12:50:14 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r45424 r45583 591 591 $b['am/pm'] = $lucifer[6]; 592 592 $b['name'] = $lucifer[8]; 593 } elseif ( ! $is_windows && $lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY ) ) { 594 //echo $line."\n"; 595 $lcount = count( $lucifer ); 596 if ( $lcount < 8 ) { 597 return ''; 598 } 599 $b = array(); 600 $b['isdir'] = $lucifer[0]{0} === 'd'; 601 $b['islink'] = $lucifer[0]{0} === 'l'; 602 if ( $b['isdir'] ) { 603 $b['type'] = 'd'; 604 } elseif ( $b['islink'] ) { 605 $b['type'] = 'l'; 606 } else { 607 $b['type'] = 'f'; 608 } 609 $b['perms'] = $lucifer[0]; 610 $b['permsn'] = $this->getnumchmodfromh( $b['perms'] ); 611 $b['number'] = $lucifer[1]; 612 $b['owner'] = $lucifer[2]; 613 $b['group'] = $lucifer[3]; 614 $b['size'] = $lucifer[4]; 615 if ( $lcount == 8 ) { 616 sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] ); 617 sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] ); 618 $b['time'] = @mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] ); 619 $b['name'] = $lucifer[7]; 620 } else { 621 $b['month'] = $lucifer[5]; 622 $b['day'] = $lucifer[6]; 623 if ( preg_match( '/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2 ) ) { 624 $b['year'] = gmdate( 'Y' ); 625 $b['hour'] = $l2[1]; 626 $b['minute'] = $l2[2]; 593 } elseif ( ! $is_windows ) { 594 $lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY ); 595 if ( $lucifer ) { 596 //echo $line."\n"; 597 $lcount = count( $lucifer ); 598 if ( $lcount < 8 ) { 599 return ''; 600 } 601 $b = array(); 602 $b['isdir'] = $lucifer[0]{0} === 'd'; 603 $b['islink'] = $lucifer[0]{0} === 'l'; 604 if ( $b['isdir'] ) { 605 $b['type'] = 'd'; 606 } elseif ( $b['islink'] ) { 607 $b['type'] = 'l'; 627 608 } else { 628 $b['year'] = $lucifer[7]; 629 $b['hour'] = 0; 630 $b['minute'] = 0; 609 $b['type'] = 'f'; 631 610 } 632 $b['time'] = strtotime( sprintf( '%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute'] ) ); 633 $b['name'] = $lucifer[8]; 611 $b['perms'] = $lucifer[0]; 612 $b['permsn'] = $this->getnumchmodfromh( $b['perms'] ); 613 $b['number'] = $lucifer[1]; 614 $b['owner'] = $lucifer[2]; 615 $b['group'] = $lucifer[3]; 616 $b['size'] = $lucifer[4]; 617 if ( $lcount == 8 ) { 618 sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] ); 619 sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] ); 620 $b['time'] = @mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] ); 621 $b['name'] = $lucifer[7]; 622 } else { 623 $b['month'] = $lucifer[5]; 624 $b['day'] = $lucifer[6]; 625 if ( preg_match( '/([0-9]{2}):([0-9]{2})/', $lucifer[7], $l2 ) ) { 626 $b['year'] = gmdate( 'Y' ); 627 $b['hour'] = $l2[1]; 628 $b['minute'] = $l2[2]; 629 } else { 630 $b['year'] = $lucifer[7]; 631 $b['hour'] = 0; 632 $b['minute'] = 0; 633 } 634 $b['time'] = strtotime( sprintf( '%d %s %d %02d:%02d', $b['day'], $b['month'], $b['year'], $b['hour'], $b['minute'] ) ); 635 $b['name'] = $lucifer[8]; 636 } 634 637 } 635 638 }
Note: See TracChangeset
for help on using the changeset viewer.