Changeset 8597
- Timestamp:
- 08/09/08 03:20:16 (4 months ago)
- Files:
-
- trunk/wp-admin/includes/update.php (modified) (3 diffs)
- trunk/wp-admin/update.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/includes/update.php
r8595 r8597 16 16 switch ( $cur->response ) { 17 17 case 'development' : 18 return sprintf( '| '.__( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], wp_nonce_url('update.php?action=upgrade-core', 'upgrade-core'));18 return sprintf( '| '.__( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), $GLOBALS['wp_version'], 'update.php?action=upgrade-core'); 19 19 break; 20 20 … … 40 40 41 41 if ( current_user_can('manage_options') ) 42 $msg = sprintf( __('WordPress %1$s is available! <a href="%2$s">Please update now</a>.'), $cur->current, wp_nonce_url('update.php?action=upgrade-core', 'upgrade-core'));42 $msg = sprintf( __('WordPress %1$s is available! <a href="%2$s">Please update now</a>.'), $cur->current, 'update.php?action=upgrade-core' ); 43 43 else 44 44 $msg = sprintf( __('WordPress %1$s is available! Please notify the site administrator.'), $cur->current ); … … 54 54 $msg = sprintf( __('This is WordPress version %s.'), $GLOBALS['wp_version'] ); 55 55 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('manage_options') ) 56 $msg .= " <a href=' " . wp_nonce_url('update.php?action=upgrade-core', 'upgrade-core') . "' class='rbutton'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';56 $msg .= " <a href='update.php?action=upgrade-core' class='rbutton'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 57 57 58 58 echo "<span id='wp-version-message'>$msg</span>"; trunk/wp-admin/update.php
r8595 r8597 42 42 } 43 43 } 44 echo '</div>'; 45 } 46 47 function core_upgrade_preamble() { 48 $update = get_option('update_core'); 49 50 echo '<div class="wrap">'; 51 echo '<h2>' . __('Upgrade WordPress') . '</h2>'; 52 53 if ( !isset($update->response) || 'latest' == $update->response ) { 54 _e('You have the latest version of WordPress. You do not need to upgrade.'); 55 echo '</div>'; 56 return; 57 } 58 59 if ( 'development' == $update->response ) { 60 $message = __('You are using a developmemt version of WordPress. You can upgrade to the latest nightly build automatically or download the nightly build and install it manually. Which would you like to do?'); 61 $submit = __('Download nightly build'); 62 } else { 63 $message = sprintf(__('You can upgrade to version %s automatically or download the nightly build and install it manually. Which would you like to do?'), $update->current); 64 $submit = sprintf(__('Download %s'), $update->current); 65 } 66 67 echo '<p>'; 68 echo $message; 69 echo '</p>'; 70 echo '<form id="post" method="post" action="update.php?action=do-core-upgrade" name="upgrade">'; 71 wp_nonce_field('upgrade-core'); 72 echo '<p>'; 73 echo '<input id="upgrade" class="button" type="submit" value="' . __('Upgrade Automatically') . '" name="upgrade" />'; 74 echo '<a href="' . $update->package . '" class="button">' . $submit . '</a>'; 75 echo '</p>'; 76 echo '</form>'; 77 44 78 echo '</div>'; 45 79 } … … 119 153 echo "</body></html>"; 120 154 } elseif ( 'upgrade-core' == $_GET['action'] ) { 121 //check_admin_referer('upgrade-core'); 155 $title = __('Upgrade WordPress'); 156 $parent_file = 'index.php'; 157 require_once('admin-header.php'); 158 core_upgrade_preamble(); 159 include('admin-footer.php'); 160 } elseif ( 'do-core-upgrade' ) { 161 check_admin_referer('upgrade-core'); 122 162 $title = __('Upgrade WordPress'); 123 163 $parent_file = 'index.php';
