Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php

    r46679 r47122  
    3939        }
    4040
    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.
    4342        if ( ! defined( 'FS_TIMEOUT' ) ) {
    4443            define( 'FS_TIMEOUT', 240 );
     
    114113        }
    115114
    116         // Set the Connection to use Passive FTP
     115        // Set the connection to use Passive FTP.
    117116        ftp_pasv( $this->link, true );
    118117        if ( @ftp_get_option( $this->link, FTP_TIMEOUT_SEC ) < FS_TIMEOUT ) {
     
    147146        }
    148147
    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.
    150149        $contents = '';
    151150
     
    204203        }
    205204
    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.
    207206
    208207        $ret = ftp_fput( $this->link, $file, $temp, FTP_BINARY );
     
    274273        }
    275274
    276         // chmod the file or directory
     275        // chmod the file or directory.
    277276        if ( ! function_exists( 'ftp_chmod' ) ) {
    278277            return (bool) ftp_site( $this->link, sprintf( 'CHMOD %o %s', $mode, $file ) );
     
    406405        }
    407406
    408         return ! empty( $list ); //empty list = no file, so invert.
     407        return ! empty( $list ); // Empty list = no file, so invert.
    409408    }
    410409
     
    574573                $lucifer[3] += 2000;
    575574            } else {
    576                 $lucifer[3] += 1900; // 4digit year fix
     575                $lucifer[3] += 1900; // 4-digit year fix.
    577576            }
    578577            $b['isdir'] = ( $lucifer[7] == '<DIR>' );
     
    594593            $lucifer = preg_split( '/[ ]/', $line, 9, PREG_SPLIT_NO_EMPTY );
    595594            if ( $lucifer ) {
    596                 //echo $line."\n";
     595                // echo $line."\n";
    597596                $lcount = count( $lucifer );
    598597                if ( $lcount < 8 ) {
     
    638637        }
    639638
    640         // Replace symlinks formatted as "source -> target" with just the source name
     639        // Replace symlinks formatted as "source -> target" with just the source name.
    641640        if ( isset( $b['islink'] ) && $b['islink'] ) {
    642641            $b['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $b['name'] );
Note: See TracChangeset for help on using the changeset viewer.