Changeset 32387 for branches/4.1/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 07:06:02 PM (11 years ago)
- File:
-
- 1 edited
-
branches/4.1/src/wp-admin/includes/upgrade.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.1/src/wp-admin/includes/upgrade.php
r32312 r32387 443 443 upgrade_400(); 444 444 445 if ( $wp_current_db_version < 3013 4)446 upgrade_41 4();445 if ( $wp_current_db_version < 30135 ) 446 upgrade_415(); 447 447 448 448 maybe_disable_link_manager(); … … 1335 1335 * Execute changes made in WordPress 4.1.4. 1336 1336 * 1337 * @since 4.1. 31337 * @since 4.1.4 1338 1338 */ 1339 1339 function upgrade_414() { 1340 } 1341 1342 /** 1343 * Execute changes made in WordPress 4.1.5. 1344 * 1345 * @since 4.1.5 1346 */ 1347 function upgrade_415() { 1340 1348 global $wp_current_db_version, $wpdb; 1341 1349 1342 if ( $wp_current_db_version < 3013 4) {1350 if ( $wp_current_db_version < 30135 ) { 1343 1351 $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); 1344 if ( ! $content_length ) { 1345 $content_length = 65535; 1346 } 1352 if ( false === $content_length ) { 1353 $content_length = array( 1354 'type' => 'byte', 1355 'length' => 65535, 1356 ); 1357 } elseif ( ! is_array( $content_length ) ) { 1358 $length = (int) $content_length > 0 ? (int) $content_length : 65535; 1359 $content_length = array( 1360 'type' => 'byte', 1361 'length' => $length 1362 ); 1363 } 1364 1365 if ( 'byte' !== $content_length['type'] ) { 1366 // Sites with malformed DB schemas are on their own. 1367 return; 1368 } 1369 1370 $allowed_length = intval( $content_length['length'] ) - 10; 1347 1371 1348 1372 $comments = $wpdb->get_results( 1349 "SELECT comment_ID FROM $wpdb->comments1350 WHERE comment_date_gmt> '2015-04-26'1351 AND CHAR_LENGTH( comment_content ) >= $content_length1352 AND ( comment_content LIKE '%<%' OR comment_contentLIKE '%>%' )"1373 "SELECT `comment_ID` FROM `{$wpdb->comments}` 1374 WHERE `comment_date_gmt` > '2015-04-26' 1375 AND LENGTH( `comment_content` ) >= {$allowed_length} 1376 AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )" 1353 1377 ); 1354 1378
Note: See TracChangeset
for help on using the changeset viewer.