Make WordPress Core


Ignore:
Timestamp:
08/26/2008 10:30:56 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r8738 r8739  
    905905                global $wp_version;
    906906                // Make sure the server has MySQL 4.0
    907                 $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info($this->dbh));
    908                 if ( version_compare($mysql_version, '4.0.0', '<') )
     907                if ( version_compare($this->db_version(), '4.0.0', '<') )
    909908                        return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
    910909        }
    … …  
    921920        function supports_collation()
    922921        {
    923                 return ( version_compare(mysql_get_server_info($this->dbh), '4.1.0', '>=') );
     922                return ( version_compare($this->db_version(), '4.1.0', '>=') );
    924923        }
    925924
    … …  
    969968        }
    970969
     970        /**
     971         * The database version number
     972         * @return false|string false on failure, version number on success
     973         */
     974        function db_version() {
     975                return preg_replace('/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ));
     976        }
    971977}
    972978
Note: See TracChangeset for help on using the changeset viewer.