Ticket #25652: 25652.3.diff
| File 25652.3.diff, 4.3 KB (added by , 13 years ago) |
|---|
-
src/wp-admin/includes/class-wp-upgrader.php
1369 1369 // Copy update-core.php from the new version into place. 1370 1370 if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) { 1371 1371 $wp_filesystem->delete($working_dir, true); 1372 return new WP_Error( 'copy_failed_for_update_core_file', $this->strings['copy_failed']);1372 return new WP_Error( 'copy_failed_for_update_core_file', __( 'The update cannot be installed because we will be unable to copy certain files. This is usually due to inconsistent file permissions.' ), 'wp-admin/includes/update-core.php' ); 1373 1373 } 1374 1374 $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); 1375 1375 -
src/wp-admin/includes/file.php
622 622 * A disk that has zero free bytes has bigger problems. 623 623 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. 624 624 */ 625 $available_space = @disk_free_space( WP_CONTENT_DIR ); 626 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 627 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 625 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 626 $available_space = @disk_free_space( WP_CONTENT_DIR ); 627 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 628 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 629 } 628 630 629 631 $needed_dirs = array_unique($needed_dirs); 630 632 foreach ( $needed_dirs as $dir ) { … … 722 724 * A disk that has zero free bytes has bigger problems. 723 725 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. 724 726 */ 725 $available_space = @disk_free_space( WP_CONTENT_DIR ); 726 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 727 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 727 if ( defined( 'DOING_CRON' ) && DOING_CRON ) { 728 $available_space = @disk_free_space( WP_CONTENT_DIR ); 729 if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) 730 return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) ); 731 } 728 732 729 733 $needed_dirs = array_unique($needed_dirs); 730 734 foreach ( $needed_dirs as $dir ) { -
src/wp-admin/includes/update-core.php
661 661 $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; 662 662 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { 663 663 $wp_filesystem->delete( $from, true ); 664 return new WP_Error( 'copy_failed_for_version_file', __( ' Could not copy file.' ));664 return new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy certain files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); 665 665 } 666 666 667 667 $wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE ); … … 729 729 $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; 730 730 731 731 if ( $files_not_writable ) 732 return new WP_Error( 'files_not_writable', __( ' Could not copy file.' ), $error_data);732 return new WP_Error( 'files_not_writable', __( 'The update cannot be installed because we will be unable to copy certain files. This is usually due to inconsistent file permissions.' ), implode( ', ', $error_data ) ); 733 733 } 734 734 } 735 735
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)