Make WordPress Core


Ignore:
Timestamp:
10/06/2007 08:40:54 AM (14 years ago)
Author:
westi
Message:

Move all calls to mysql_ functions to withiWPDB so that t we don't expect any mysql stuff when we are using a custo$wpdb class. Fixes #5127
props ComputerGuru.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r6158 r6199  
    12401240
    12411241function wp_check_mysql_version() {
    1242     global $wp_version;
    1243 
    1244     // Make sure the server has MySQL 4.0
    1245     $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info());
    1246     if ( version_compare($mysql_version, '4.0.0', '<') )
    1247         die(sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
     1242    global $wpdb;
     1243    $result = $wpdb->check_database_version();
     1244    if ( is_wp_error( $result ) )
     1245        die( $result->get_error_message() );
    12481246}
    12491247
Note: See TracChangeset for help on using the changeset viewer.