Changeset 6199
- Timestamp:
- 10/06/2007 08:40:54 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/schema.php
r6178 r6199 4 4 $charset_collate = ''; 5 5 6 if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) {6 if ( $wpdb->supports_collation() ) { 7 7 if ( ! empty($wpdb->charset) ) 8 8 $charset_collate = "DEFAULT CHARACTER SET $wpdb->charset"; -
trunk/wp-admin/includes/upgrade.php
r6158 r6199 1240 1240 1241 1241 function 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() ); 1248 1246 } 1249 1247 -
trunk/wp-includes/wp-db.php
r6110 r6199 404 404 wp_die($message); 405 405 } 406 /** 407 * Checks wether of not the database version is high enough to support the features WordPress uses 408 * @global $wp_version 409 */ 410 function check_database_version() 411 { 412 global $wp_version; 413 // Make sure the server has MySQL 4.0 414 $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info()); 415 if ( version_compare($mysql_version, '4.0.0', '<') ) 416 return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version)); 417 } 418 419 /** 420 * This function is called when WordPress is generating the table schema to determine wether or not the current database 421 * supports or needs the collation statements. 422 */ 423 function supports_collation() 424 { 425 return ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ); 426 } 406 427 } 407 428
Note: See TracChangeset
for help on using the changeset viewer.