Changeset 50657
- Timestamp:
- 04/05/2021 10:36:17 AM (4 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-base.php
r49936 r50657 275 275 276 276 foreach ( $folder_parts as $index => $key ) { 277 if ( $index == $last_index ) {277 if ( $index === $last_index ) { 278 278 continue; // We want this to be caught by the next code block. 279 279 } … … 344 344 $perms = intval( $this->getchmod( $file ), 8 ); 345 345 346 if ( ( $perms & 0xC000 ) == 0xC000 ) { // Socket.346 if ( ( $perms & 0xC000 ) === 0xC000 ) { // Socket. 347 347 $info = 's'; 348 } elseif ( ( $perms & 0xA000 ) == 0xA000 ) { // Symbolic Link.348 } elseif ( ( $perms & 0xA000 ) === 0xA000 ) { // Symbolic Link. 349 349 $info = 'l'; 350 } elseif ( ( $perms & 0x8000 ) == 0x8000 ) { // Regular.350 } elseif ( ( $perms & 0x8000 ) === 0x8000 ) { // Regular. 351 351 $info = '-'; 352 } elseif ( ( $perms & 0x6000 ) == 0x6000 ) { // Block special.352 } elseif ( ( $perms & 0x6000 ) === 0x6000 ) { // Block special. 353 353 $info = 'b'; 354 } elseif ( ( $perms & 0x4000 ) == 0x4000 ) { // Directory.354 } elseif ( ( $perms & 0x4000 ) === 0x4000 ) { // Directory. 355 355 $info = 'd'; 356 } elseif ( ( $perms & 0x2000 ) == 0x2000 ) { // Character special.356 } elseif ( ( $perms & 0x2000 ) === 0x2000 ) { // Character special. 357 357 $info = 'c'; 358 } elseif ( ( $perms & 0x1000 ) == 0x1000 ) { // FIFO pipe.358 } elseif ( ( $perms & 0x1000 ) === 0x1000 ) { // FIFO pipe. 359 359 $info = 'p'; 360 360 } else { // Unknown. -
trunk/src/wp-admin/includes/class-wp-filesystem-direct.php
r49936 r50657 506 506 */ 507 507 public function touch( $file, $time = 0, $atime = 0 ) { 508 if ( 0 == $time ) {508 if ( 0 === $time ) { 509 509 $time = time(); 510 510 } 511 511 512 if ( 0 == $atime ) {512 if ( 0 === $atime ) { 513 513 $atime = time(); 514 514 } … … 631 631 } 632 632 633 if ( $limit_file && $struc['name'] != $limit_file ) {633 if ( $limit_file && $struc['name'] !== $limit_file ) { 634 634 continue; 635 635 } -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpext.php
r49936 r50657 451 451 $result = @ftp_chdir( $this->link, trailingslashit( $path ) ); 452 452 453 if ( $result && $path == $this->cwd() || $this->cwd() != $cwd ) {453 if ( $result && $path === $this->cwd() || $this->cwd() !== $cwd ) { 454 454 @ftp_chdir( $this->link, $cwd ); 455 455 return true; … … 615 615 $b['hour'] = $lucifer[4]; 616 616 $b['minute'] = $lucifer[5]; 617 $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) == 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] );617 $b['time'] = mktime( $lucifer[4] + ( strcasecmp( $lucifer[6], 'PM' ) === 0 ? 12 : 0 ), $lucifer[5], 0, $lucifer[1], $lucifer[2], $lucifer[3] ); 618 618 $b['am/pm'] = $lucifer[6]; 619 619 $b['name'] = $lucifer[8]; … … 648 648 $b['size'] = $lucifer[4]; 649 649 650 if ( 8 == $lcount ) {650 if ( 8 === $lcount ) { 651 651 sscanf( $lucifer[5], '%d-%d-%d', $b['year'], $b['month'], $b['day'] ); 652 652 sscanf( $lucifer[6], '%d:%d', $b['hour'], $b['minute'] ); … … 746 746 } 747 747 748 if ( $limit_file && $entry['name'] != $limit_file ) {748 if ( $limit_file && $entry['name'] !== $limit_file ) { 749 749 continue; 750 750 } -
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r49936 r50657 211 211 $bytes_written = fwrite( $temphandle, $contents ); 212 212 213 if ( false === $bytes_written || strlen( $contents ) != $bytes_written ) {213 if ( false === $bytes_written || strlen( $contents ) !== $bytes_written ) { 214 214 fclose( $temphandle ); 215 215 unlink( $tempfile ); … … 651 651 } 652 652 653 if ( $limit_file && $struc['name'] != $limit_file ) {653 if ( $limit_file && $struc['name'] !== $limit_file ) { 654 654 continue; 655 655 } -
trunk/src/wp-admin/includes/class-wp-filesystem-ssh2.php
r49936 r50657 780 780 } 781 781 782 if ( $limit_file && $struc['name'] != $limit_file ) {782 if ( $limit_file && $struc['name'] !== $limit_file ) { 783 783 continue; 784 784 }
Note: See TracChangeset
for help on using the changeset viewer.