Changeset 33063 for branches/4.2/src/wp-admin/includes/upgrade.php
- Timestamp:
- 07/03/2015 12:43:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-admin/includes/upgrade.php
r33059 r33063 525 525 upgrade_400(); 526 526 527 // Don't harsh my mellow. upgrade_422() must be called before528 // upgrade_420() to catch bad comments prior to any auto-expansion of529 // MySQL column widths.530 527 if ( $wp_current_db_version < 31534 ) 531 528 upgrade_422(); 532 529 533 if ( $wp_current_db_version < 31 351)534 upgrade_42 0();530 if ( $wp_current_db_version < 31536 ) 531 upgrade_423(); 535 532 536 533 maybe_disable_link_manager(); … … 1427 1424 */ 1428 1425 function upgrade_420() { 1429 global $wp_current_db_version, $wpdb;1430 1431 if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) {1432 if ( is_multisite() ) {1433 $tables = $wpdb->tables( 'blog' );1434 } else {1435 $tables = $wpdb->tables( 'all' );1436 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {1437 $global_tables = $wpdb->tables( 'global' );1438 $tables = array_diff_assoc( $tables, $global_tables );1439 }1440 }1441 1442 foreach ( $tables as $table ) {1443 maybe_convert_table_to_utf8mb4( $table );1444 }1445 }1446 1426 } 1447 1427 … … 1498 1478 foreach ( $comments as $comment ) { 1499 1479 wp_delete_comment( $comment->comment_ID, true ); 1480 } 1481 } 1482 } 1483 1484 /** 1485 * Execute changes made in WordPress 4.2.0. 1486 * 1487 * @since 4.2.3 1488 */ 1489 function upgrade_423() { 1490 global $wp_current_db_version, $wpdb; 1491 1492 if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) { 1493 if ( is_multisite() ) { 1494 $tables = $wpdb->tables( 'blog' ); 1495 } else { 1496 $tables = $wpdb->tables( 'all' ); 1497 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 1498 $global_tables = $wpdb->tables( 'global' ); 1499 $tables = array_diff_assoc( $tables, $global_tables ); 1500 } 1501 } 1502 1503 foreach ( $tables as $table ) { 1504 maybe_convert_table_to_utf8mb4( $table ); 1500 1505 } 1501 1506 } … … 1629 1634 if ( $upgrade ) { 1630 1635 $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" ); 1636 } 1637 } 1638 } 1639 1640 // 4.2.3 1641 if ( $wp_current_db_version < 31536 && $wpdb->charset === 'utf8mb4' ) { 1642 if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 1643 $tables = $wpdb->tables( 'global' ); 1644 1645 foreach ( $tables as $table ) { 1646 maybe_convert_table_to_utf8mb4( $table ); 1631 1647 } 1632 1648 }
Note: See TracChangeset
for help on using the changeset viewer.