- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r46679 r47122 39 39 } 40 40 41 // This Class uses the timeout on a per-connection basis, Others use it on a per-action basis. 42 41 // This class uses the timeout on a per-connection basis, others use it on a per-action basis. 43 42 if ( ! defined( 'FS_TIMEOUT' ) ) { 44 43 define( 'FS_TIMEOUT', 240 ); … … 114 113 } 115 114 116 // Set the Connection to use Passive FTP115 // Set the connection to use Passive FTP. 117 116 ftp_pasv( $this->link, true ); 118 117 if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) { … … 147 146 } 148 147 149 fseek( $temp, 0 ); // Skip back to the start of the file being written to 148 fseek( $temp, 0 ); // Skip back to the start of the file being written to. 150 149 $contents = ''; 151 150 … … 204 203 } 205 204 206 fseek( $temp, 0 ); // Skip back to the start of the file being written to 205 fseek( $temp, 0 ); // Skip back to the start of the file being written to. 207 206 208 207 $ret = ftp_fput( $this->link, $file, $temp, FTP_BINARY ); … … 274 273 } 275 274 276 // chmod the file or directory 275 // chmod the file or directory. 277 276 if ( ! function_exists( 'ftp_chmod' ) ) { 278 277 return (bool) ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) ); … … 406 405 } 407 406 408 return ! empty( $list ); // empty list = no file, so invert.407 return ! empty( $list ); // Empty list = no file, so invert. 409 408 } 410 409 … … 574 573 $lucifer[3] += 2000; 575 574 } else { 576 $lucifer[3] += 1900; // 4 digit year fix575 $lucifer[3] += 1900; // 4-digit year fix. 577 576 } 578 577 $b['isdir'] = ( $lucifer[7] == '<DIR>' ); … … 594 593 $lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY ); 595 594 if ( $lucifer ) { 596 // echo $line."\n";595 // echo $line."\n"; 597 596 $lcount = count( $lucifer ); 598 597 if ( $lcount < 8 ) { … … 638 637 } 639 638 640 // Replace symlinks formatted as "source -> target" with just the source name 639 // Replace symlinks formatted as "source -> target" with just the source name. 641 640 if ( isset( $b['islink'] ) && $b['islink'] ) { 642 641 $b['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $b['name'] );
Note: See TracChangeset
for help on using the changeset viewer.