mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
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:
@@ -904,8 +904,7 @@ class wpdb {
|
||||
{
|
||||
global $wp_version;
|
||||
// Make sure the server has MySQL 4.0
|
||||
$mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info($this->dbh));
|
||||
if ( version_compare($mysql_version, '4.0.0', '<') )
|
||||
if ( version_compare($this->db_version(), '4.0.0', '<') )
|
||||
return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
|
||||
}
|
||||
|
||||
@@ -920,7 +919,7 @@ class wpdb {
|
||||
*/
|
||||
function supports_collation()
|
||||
{
|
||||
return ( version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') );
|
||||
return ( version_compare($this->db_version(), '4.1.0', '>=') );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -968,6 +967,13 @@ class wpdb {
|
||||
return $caller;
|
||||
}
|
||||
|
||||
/**
|
||||
* The database version number
|
||||
* @return false|string false on failure, version number on success
|
||||
*/
|
||||
function db_version() {
|
||||
return preg_replace('/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ));
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! isset($wpdb) ) {
|
||||
|
||||
Reference in New Issue
Block a user