Changeset 32364 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 02:59:50 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r32310 r32364 528 528 upgrade_420(); 529 529 530 if ( $wp_current_db_version < 323 08)530 if ( $wp_current_db_version < 32364 ) 531 531 upgrade_430(); 532 532 … … 1447 1447 global $wp_current_db_version, $wpdb; 1448 1448 1449 if ( $wp_current_db_version < 323 08) {1449 if ( $wp_current_db_version < 32364 ) { 1450 1450 $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); 1451 if ( ! $content_length ) { 1452 $content_length = 65535; 1453 } 1451 if ( false === $content_length ) { 1452 $content_length = array( 1453 'type' => 'byte', 1454 'length' => 65535, 1455 ); 1456 } elseif ( ! is_array( $content_length ) ) { 1457 $length = (int) $content_length > 0 ? (int) $content_length : 65535; 1458 $content_length = array( 1459 'type' => 'byte', 1460 'length' => $length 1461 ); 1462 } 1463 1464 if ( 'byte' !== $content_length['type'] ) { 1465 // Sites with malformed DB schemas are on their own. 1466 return; 1467 } 1468 1469 $allowed_length = intval( $content_length['length'] ) - 10; 1454 1470 1455 1471 $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 '%>%' )"1472 "SELECT `comment_ID` FROM `{$wpdb->comments}` 1473 WHERE `comment_date_gmt` > '2015-04-26' 1474 AND LENGTH( `comment_content` ) >= {$allowed_length} 1475 AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )" 1460 1476 ); 1461 1477
Note: See TracChangeset
for help on using the changeset viewer.