include mysql version in version check query string. Props andy. fixes #7600 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@8739 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-08-26 22:30:56 +00:00
parent 13cf1a5c78
commit e4dd07c75e
2 changed files with 16 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ function wp_version_check() {
if ( defined('WP_INSTALLING') )
return;
global $wp_version;
global $wp_version, $wpdb;
$php_version = phpversion();
$current = get_option( 'update_core' );
@@ -40,7 +40,12 @@ function wp_version_check() {
$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
$new_option->version_checked = $wp_version;
$url = "http://api.wordpress.org/core/version-check/1.2/?version=$wp_version&php=$php_version&locale=$locale";
if ( method_exists( $wpdb, 'db_version' ) )
$mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version($wpdb->users));
else
$mysql_version = 'N/A';
$url = "http://api.wordpress.org/core/version-check/1.2/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version";
$options = array('timeout' => 3);
$options['headers'] = array(