Changeset 1481
- Timestamp:
- 09/19/08 13:05:29 (2 months ago)
- Files:
-
- branches/2.6/wp-admin/includes/mu.php (modified) (1 diff)
- branches/2.6/wp-admin/includes/update.php (modified) (4 diffs)
- branches/2.6/wp-includes/update.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.6/wp-admin/includes/mu.php
r1467 r1481 695 695 add_action( 'wp_dashboard_setup', 'mu_dashboard' ); 696 696 697 /* Unused update message called from Dashboard */698 function update_right_now_message() {699 }700 701 697 function profile_update_primary_blog() { 702 698 global $current_user; branches/2.6/wp-admin/includes/update.php
r1374 r1481 1 1 <?php 2 /*3 2 4 3 // The admin side of our 1.1 update system 5 4 6 5 function core_update_footer( $msg = '' ) { 6 if( !is_site_admin() ) 7 return false; 7 8 if ( !current_user_can('manage_options') ) 8 9 return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); 9 10 10 $cur = get_ option( 'update_core' );11 $cur = get_site_option( 'update_core' ); 11 12 12 13 switch ( $cur->response ) { … … 30 31 31 32 function update_nag() { 32 $cur = get_option( 'update_core' ); 33 if( !is_site_admin() ) 34 return false; 35 $cur = get_site_option( 'update_core' ); 33 36 34 37 if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) … … 46 49 // Called directly from dashboard 47 50 function update_right_now_message() { 48 $cur = get_option( 'update_core' ); 51 if( !is_site_admin() ) 52 return false; 53 $cur = get_site_option( 'update_core' ); 49 54 50 55 $msg = sprintf( __('This is WordPress version %s.'), $GLOBALS['wp_version'] ); … … 54 59 echo "<span id='wp-version-message'>$msg</span>"; 55 60 } 56 */57 61 58 62 function wp_plugin_update_row( $file, $plugin_data ) { branches/2.6/wp-includes/update.php
r1476 r1481 23 23 return; 24 24 25 global $wp_version, $ current_site;25 global $wp_version, $wpmu_version, $current_site; 26 26 $php_version = phpversion(); 27 27 28 $current = get_ option( 'update_core' );28 $current = get_site_option( 'update_core' ); 29 29 $locale = get_locale(); 30 30 … … 32 32 isset( $current->last_checked ) && 33 33 43200 > ( time() - $current->last_checked ) && 34 $current->version_checked == $wp _version34 $current->version_checked == $wpmu_version 35 35 ) 36 36 return false; … … 38 38 $new_option = ''; 39 39 $new_option->last_checked = time(); // this gets set whether we get a response or not, so if something is down or misconfigured it won't delay the page load for more than 3 seconds, twice a day 40 $new_option->version_checked = $wp _version;40 $new_option->version_checked = $wpmu_version; 41 41 42 $http_request = "GET /core/version-check/1.1/?version=$wp_version& php=$php_version&locale=$localeHTTP/1.0\r\n";42 $http_request = "GET /core/version-check/1.1/?version=$wp_version&wpmuversion=$wpmu_version&php=$php_version&locale=$locale&blogs=" . get_blog_count() . " HTTP/1.0\r\n"; 43 43 $http_request .= "Host: api.wordpress.org\r\n"; 44 44 $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . get_option('blog_charset') . "\r\n"; 45 $http_request .= 'User-Agent: WordPress MU/' . $wpmu_version . '; ' . get_bloginfo('url') . '; http://' . $current_site->domain . $current_site->path. "\r\n";45 $http_request .= 'User-Agent: WordPress MU/' . $wpmu_version . '; ' . apply_filters( 'currentsite_on_version_check', 'http://' . $current_site->domain . $current_site->path ) . "\r\n"; 46 46 $http_request .= "\r\n"; 47 47 … … 64 64 $new_option->response = attribute_escape( $returns[0] ); 65 65 if ( isset( $returns[1] ) ) 66 $new_option->url = clean_url( $returns[1] );66 $new_option->url = 'http://mu.wordpress.org/'; 67 67 if ( isset( $returns[2] ) ) 68 68 $new_option->current = attribute_escape( $returns[2] ); 69 69 } 70 update_ option( 'update_core', $new_option );70 update_site_option( 'update_core', $new_option ); 71 71 } 72 72 add_action( 'init', 'wp_version_check' );
