Make WordPress Core


Ignore:
Timestamp:
10/25/2011 05:29:28 AM (14 years ago)
Author:
nacin
Message:

Introduce ->mysql to allow drop-ins to declare themselves as MySQL and therefore allow minimum version checks to still apply. fixes #18176.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/update-core.php

    r19054 r19060  
    4545            $form_action = 'update-core.php?action=do-core-reinstall';
    4646        } else {
    47             $php_compat     = version_compare( $php_version, $update->php_version, '>=' );
    48             $mysql_compat   = version_compare( $mysql_version, $update->mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
     47            $php_compat     = version_compare( $php_version, $update->php_version, '>=' );         
     48            if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
     49                $mysql_compat = true;
     50            else
     51                $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' );
     52
    4953            if ( !$mysql_compat && !$php_compat )
    5054                $message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $update->current, $update->php_version, $update->mysql_version, $php_version, $mysql_version );
Note: See TracChangeset for help on using the changeset viewer.