Changeset 32367 for branches/4.2/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 03:29:01 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-admin/includes/upgrade.php
r32311 r32367 528 528 upgrade_420(); 529 529 530 if ( $wp_current_db_version < 3153 3)531 upgrade_42 1();530 if ( $wp_current_db_version < 31534 ) 531 upgrade_422(); 532 532 533 533 maybe_disable_link_manager(); … … 1445 1445 */ 1446 1446 function upgrade_421() { 1447 } 1448 1449 /** 1450 * Execute changes made in WordPress 4.2.2. 1451 * 1452 * @since 4.2.2 1453 */ 1454 function upgrade_422() { 1447 1455 global $wp_current_db_version, $wpdb; 1448 1456 1449 if ( $wp_current_db_version < 3153 3) {1457 if ( $wp_current_db_version < 31534 ) { 1450 1458 $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); 1451 if ( ! $content_length ) { 1452 $content_length = 65535; 1453 } 1459 if ( false === $content_length ) { 1460 $content_length = array( 1461 'type' => 'byte', 1462 'length' => 65535, 1463 ); 1464 } elseif ( ! is_array( $content_length ) ) { 1465 $length = (int) $content_length > 0 ? (int) $content_length : 65535; 1466 $content_length = array( 1467 'type' => 'byte', 1468 'length' => $length 1469 ); 1470 } 1471 1472 if ( 'byte' !== $content_length['type'] ) { 1473 // Sites with malformed DB schemas are on their own. 1474 return; 1475 } 1476 1477 $allowed_length = intval( $content_length['length'] ) - 10; 1454 1478 1455 1479 $comments = $wpdb->get_results( 1456 "SELECT comment_ID FROM $wpdb->comments1457 WHERE comment_date_gmt> '2015-04-26'1458 AND CHAR_LENGTH( comment_content ) >= $content_length1459 AND ( comment_content LIKE '%<%' OR comment_contentLIKE '%>%' )"1480 "SELECT `comment_ID` FROM `{$wpdb->comments}` 1481 WHERE `comment_date_gmt` > '2015-04-26' 1482 AND LENGTH( `comment_content` ) >= {$allowed_length} 1483 AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )" 1460 1484 ); 1461 1485
Note: See TracChangeset
for help on using the changeset viewer.