Ticket #25572: 25572.4.diff
File 25572.4.diff, 886 bytes (added by , 12 years ago) |
---|
-
src/wp-admin/includes/class-wp-upgrader.php
1504 1504 1505 1505 $check_dirs = array_unique( $check_dirs ); 1506 1506 1507 $checkout = false; 1507 1508 // Search all directories we've found for evidence of version control. 1508 foreach ( $vcs_dirs as $vcs_dir ) { 1509 foreach ( $check_dirs as $check_dir ) { 1510 if ( $checkout = is_dir( rtrim( $check_dir, '\\/' ) . "/$vcs_dir" ) ) 1511 break 2; 1509 foreach ( $check_dirs as $check_dir ) { 1510 $files = @scandir( $check_dir ); 1511 if ( false === $files ) 1512 break; 1513 if ( array_intersect( $files, $vcs_dirs ) ) { 1514 $checkout = true; 1515 break; 1512 1516 } 1513 1517 } 1514 1518 return apply_filters( 'auto_upgrade_is_vcs_checkout', $checkout, $context );