- Timestamp:
- 07/09/2019 05:44:42 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r45583 r45611 115 115 116 116 // Set the Connection to use Passive FTP 117 @ftp_pasv( $this->link, true );117 ftp_pasv( $this->link, true ); 118 118 if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) { 119 119 @ftp_set_option( $this->link, FTP_TIMEOUT_SEC, FS_TIMEOUT ); … … 141 141 } 142 142 143 if ( ! @ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) {143 if ( ! ftp_fget( $this->link, $temp, $file, FTP_BINARY ) ) { 144 144 fclose( $temp ); 145 145 unlink( $tempfile ); … … 206 206 fseek( $temp, 0 ); // Skip back to the start of the file being written to 207 207 208 $ret = @ftp_fput( $this->link, $file, $temp, FTP_BINARY );208 $ret = ftp_fput( $this->link, $file, $temp, FTP_BINARY ); 209 209 210 210 fclose( $temp ); … … 224 224 */ 225 225 public function cwd() { 226 $cwd = @ftp_pwd( $this->link );226 $cwd = ftp_pwd( $this->link ); 227 227 if ( $cwd ) { 228 228 $cwd = trailingslashit( $cwd ); … … 276 276 // chmod the file or directory 277 277 if ( ! function_exists( 'ftp_chmod' ) ) { 278 return (bool) @ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );279 } 280 return (bool) @ftp_chmod( $this->link, $mode, $file );278 return (bool) ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) ); 279 } 280 return (bool) ftp_chmod( $this->link, $mode, $file ); 281 281 } 282 282 … … 376 376 } 377 377 if ( 'f' == $type || $this->is_file( $file ) ) { 378 return @ftp_delete( $this->link, $file );378 return ftp_delete( $this->link, $file ); 379 379 } 380 380 if ( ! $recursive ) { 381 return @ftp_rmdir( $this->link, $file );381 return ftp_rmdir( $this->link, $file ); 382 382 } 383 383 … … 388 388 } 389 389 } 390 return @ftp_rmdir( $this->link, $file );390 return ftp_rmdir( $this->link, $file ); 391 391 } 392 392 … … 400 400 */ 401 401 public function exists( $file ) { 402 $list = @ftp_nlist( $this->link, $file );402 $list = ftp_nlist( $this->link, $file ); 403 403 404 404 if ( empty( $list ) && $this->is_dir( $file ) ) { … … 537 537 } 538 538 539 if ( ! @ftp_mkdir( $this->link, $path ) ) {539 if ( ! ftp_mkdir( $this->link, $path ) ) { 540 540 return false; 541 541 } … … 588 588 $b['hour'] = $lucifer[4]; 589 589 $b['minute'] = $lucifer[5]; 590 $b['time'] = @mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );590 $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] ); 591 591 $b['am/pm'] = $lucifer[6]; 592 592 $b['name'] = $lucifer[8]; … … 618 618 sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] ); 619 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'] );620 $b['time'] = mktime( $b['hour'], $b['minute'], 0, $b['month'], $b['day'], $b['year'] ); 621 621 $b['name'] = $lucifer[7]; 622 622 } else { … … 679 679 } 680 680 681 $pwd = @ftp_pwd( $this->link );681 $pwd = ftp_pwd( $this->link ); 682 682 if ( ! @ftp_chdir( $this->link, $path ) ) { // Can't change to folder = folder doesn't exist. 683 683 return false; 684 684 } 685 $list = @ftp_rawlist( $this->link, '-a', false );685 $list = ftp_rawlist( $this->link, '-a', false ); 686 686 @ftp_chdir( $this->link, $pwd ); 687 687
Note: See TracChangeset
for help on using the changeset viewer.