Changeset 10166 for trunk/wp-admin/update-core.php
- Timestamp:
- 12/10/2008 07:59:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update-core.php
r10150 r10166 20 20 $current = true; 21 21 $submit = __('Upgrade Automatically'); 22 $form_action = 'update-core.php?action=do-core-upgrade'; 22 23 if ( 'development' == $update->response ) { 23 24 $message = __('You are using a development version of WordPress. You can upgrade to the latest nightly build automatically or download the nightly build and install it manually:'); … … 27 28 $message = sprintf(__('You have the latest version of WordPress. You do not need to upgrade. However, if you want to re-install version %s, you can do so automatically or download the package and re-install manually:'), $version_string); 28 29 $submit = __('Re-install Automatically'); 30 $form_action = 'update-core.php?action=do-core-reinstall'; 29 31 } else { 30 32 $message = sprintf(__('You can upgrade to version %s automatically or download the package and install it manually:'), $version_string); … … 36 38 echo $message; 37 39 echo '</p>'; 38 echo '<form method="post" action=" update-core.php?action=do-core-upgrade" name="upgrade" class="upgrade">';40 echo '<form method="post" action="' . $form_action . '" name="upgrade" class="upgrade">'; 39 41 wp_nonce_field('upgrade-core'); 40 42 echo '<p>'; … … 130 132 * @return null 131 133 */ 132 function do_core_upgrade( ) {134 function do_core_upgrade( $reinstall = false ) { 133 135 global $wp_filesystem; 134 136 … … 160 162 } 161 163 164 if ( $reinstall ) 165 $update->response = 'reinstall'; 166 162 167 $result = wp_update_core($update, 'show_message'); 163 168 … … 200 205 core_upgrade_preamble(); 201 206 include('admin-footer.php'); 202 } elseif ( 'do-core-upgrade' == $action ) {207 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 203 208 check_admin_referer('upgrade-core'); 204 209 $title = __('Upgrade WordPress'); … … 211 216 do_undismiss_core_update(); 212 217 require_once('admin-header.php'); 218 if ( 'do-core-reinstall' == $action ) 219 $reinstall = true; 220 else 221 $reinstall = false; 213 222 if ( isset( $_POST['upgrade'] ) ) 214 do_core_upgrade( );223 do_core_upgrade($reinstall); 215 224 include('admin-footer.php'); 225 216 226 }?>
Note: See TracChangeset
for help on using the changeset viewer.