Ticket #18176: 18176.2.diff
| File 18176.2.diff, 3.7 KB (added by , 14 years ago) |
|---|
-
wp-includes/wp-db.php
461 461 var $func_call; 462 462 463 463 /** 464 * Whether MySQL is used as the database engine. 465 * 466 * Set in WPDB::db_connect() to true, by default. This is used when checking 467 * against the required MySQL version for WordPress. Normally, a replacement 468 * database drop-in (db.php) will skip these checks, but setting this to true 469 * will force the checks to occur. 470 * 471 * @since 3.3.0 472 * @access public 473 * @var bool 474 */ 475 public $is_mysql = null; 476 477 /** 464 478 * Connects to the database server and selects a database 465 479 * 466 480 * PHP5 style constructor for compatibility with PHP5. Does … … 1013 1027 * @since 3.0.0 1014 1028 */ 1015 1029 function db_connect() { 1030 1031 $this->is_mysql = true; 1032 1016 1033 if ( WP_DEBUG ) { 1017 1034 $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true ); 1018 1035 } else { -
wp-admin/includes/update-core.php
337 337 $required_mysql_version = '5.0'; 338 338 $wp_version = '3.2'; 339 339 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); 340 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 340 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $this->is_mysql ) ) 341 $mysql_compat = true; 342 else 343 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); 341 344 342 345 if ( !$mysql_compat || !$php_compat ) 343 346 $wp_filesystem->delete($from, true); -
wp-admin/upgrade.php
38 38 $php_version = phpversion(); 39 39 $mysql_version = $wpdb->db_version(); 40 40 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); 41 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 41 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) 42 $mysql_compat = true; 43 else 44 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); 42 45 43 46 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); 44 47 ?> -
wp-admin/update-core.php
40 40 $submit = __('Re-install Now'); 41 41 $form_action = 'update-core.php?action=do-core-reinstall'; 42 42 } else { 43 $php_compat = version_compare( $php_version, $update->php_version, '>=' ); 44 $mysql_compat = version_compare( $mysql_version, $update->mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 43 $php_compat = version_compare( $php_version, $update->php_version, '>=' ); 44 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) 45 $mysql_compat = true; 46 else 47 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); 48 45 49 if ( !$mysql_compat && !$php_compat ) 46 50 $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 ); 47 51 elseif ( !$php_compat )