Ticket #18467: 18467.alt.diff
| File 18467.alt.diff, 4.8 KB (added by , 14 years ago) |
|---|
-
wp-admin/includes/class-wp-upgrader.php
975 975 $working_dir = $this->unpack_package( $download ); 976 976 if ( is_wp_error($working_dir) ) 977 977 return $working_dir; 978 978 /* 979 979 // Copy update-core.php from the new version into place. 980 980 if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) { 981 981 $wp_filesystem->delete($working_dir, true); 982 982 return new WP_Error('copy_failed', $this->strings['copy_failed']); 983 983 } 984 984 $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE); 985 985 */ 986 986 require(ABSPATH . 'wp-admin/includes/update-core.php'); 987 987 988 988 return update_core($working_dir, $wp_dir); -
wp-admin/includes/update-core.php
374 374 $maintenance_file = $to . '.maintenance'; 375 375 $wp_filesystem->delete($maintenance_file); 376 376 $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); 377 377 $result = true; 378 /* 378 379 // Copy new versions of WP files into place. 379 380 $result = _copy_dir($from . $distro, $to, array('wp-content') ); 380 381 */ 381 382 // Custom Content Directory needs updating now. 382 383 // Copy Languages 383 384 if ( !is_wp_error($result) && $wp_filesystem->is_dir($from . $distro . 'wp-content/languages') ) { … … 465 466 466 467 // Remove maintenance file, we're done. 467 468 $wp_filesystem->delete($maintenance_file); 469 470 // If we made it this far: 471 do_action( '_core_updated_successfully', $wp_version ); 468 472 } 469 473 470 474 /** … … 525 529 /** 526 530 * Redirect to the About WordPress page after a successful upgrade. 527 531 * 528 * This is a temporary function for the 3.3 upgrade only and will be removed in a later version.529 * 532 * This function is only needed when the existing install is older than 3.3.0. 533 * 530 534 * @since 3.3.0 531 535 * 532 536 */ 533 function _redirect_to_about_wordpress() { 534 // Only for WP version < 3.3.0 535 if ( version_compare( $GLOBALS['wp_version'], '3.3.0', '>' ) ) 536 return; 537 ?> 537 function _redirect_to_about_wordpress( $wp_version ) { 538 // Load the updated default text localization domain for new strings 539 load_default_textdomain(); 540 541 // See do_core_upgrade() 542 show_message( __('WordPress updated successfully') ); 543 show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $wp_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 544 show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $wp_version, esc_url( admin_url( 'about.php?updated' ) ) ) . '</span>' ); 545 echo '</div>'; 546 ?> 538 547 <script type="text/javascript"> 539 window.location = '<?php echo admin_url( 'about.php?upgraded' ); ?>';548 //window.location = '<?php echo admin_url( 'about.php?updated' ); ?>'; 540 549 </script> 541 <?php 550 <?php 551 552 // Include admin-footer.php and exit 553 include(ABSPATH . 'wp-admin/admin-footer.php'); 554 exit(); 542 555 } 543 544 add_action( 'admin_footer-update-core.php', '_redirect_to_about_wordpress' ); 545 ?> 556 add_action( '_core_updated_successfully', '_redirect_to_about_wordpress' ); -
wp-admin/update-core.php
379 379 if ('up_to_date' != $result->get_error_code() ) 380 380 show_message( __('Installation Failed') ); 381 381 } else { 382 // Essentially, this code is forever dead. 382 383 show_message( __('WordPress updated successfully') ); 383 384 show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a>' ); 384 385 } -
wp-admin/about.php
160 160 </div> 161 161 162 162 <div class="return-to-dashboard"> 163 <?php if ( current_user_can( 'update_core' ) && isset( $_GET['upgraded'] ) ) : ?> 163 <?php 164 if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : 165 if ( is_multisite() ) : ?> 166 <a href="<?php echo esc_url( network_admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Updates' ); ?></a> | 167 <?php else : ?> 164 168 <a href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>"><?php _e( 'Return to Dashboard → Updates' ); ?></a> | 165 <?php endif; ?> 169 <?php 170 endif; 171 endif; 172 ?> 166 173 <a href="<?php echo esc_url( admin_url() ); ?>"><?php _e( 'Go to Dashboard → Home' ); ?></a> 167 174 </div> 168 175