Changeset 32389 for branches/3.9/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 07:11:47 PM (11 years ago)
- File:
-
- 1 edited
-
branches/3.9/src/wp-admin/includes/upgrade.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9/src/wp-admin/includes/upgrade.php
r32316 r32389 431 431 upgrade_380(); 432 432 433 if ( $wp_current_db_version < 2791 7)434 upgrade_39 6();433 if ( $wp_current_db_version < 27918 ) 434 upgrade_397(); 435 435 436 436 maybe_disable_link_manager(); … … 1281 1281 */ 1282 1282 function upgrade_396() { 1283 } 1284 1285 /** 1286 * Execute changes made in WordPress 3.9.7. 1287 * 1288 * @since 3.9.7 1289 */ 1290 function upgrade_397() { 1283 1291 global $wp_current_db_version, $wpdb; 1284 1292 1285 if ( $wp_current_db_version < 2791 7) {1293 if ( $wp_current_db_version < 27918 ) { 1286 1294 $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); 1287 if ( ! $content_length ) { 1288 $content_length = 65535; 1289 } 1295 if ( false === $content_length ) { 1296 $content_length = array( 1297 'type' => 'byte', 1298 'length' => 65535, 1299 ); 1300 } elseif ( ! is_array( $content_length ) ) { 1301 $length = (int) $content_length > 0 ? (int) $content_length : 65535; 1302 $content_length = array( 1303 'type' => 'byte', 1304 'length' => $length 1305 ); 1306 } 1307 1308 if ( 'byte' !== $content_length['type'] ) { 1309 // Sites with malformed DB schemas are on their own. 1310 return; 1311 } 1312 1313 $allowed_length = intval( $content_length['length'] ) - 10; 1290 1314 1291 1315 $comments = $wpdb->get_results( 1292 "SELECT comment_ID FROM $wpdb->comments1293 WHERE comment_date_gmt> '2015-04-26'1294 AND CHAR_LENGTH( comment_content ) >= $content_length1295 AND ( comment_content LIKE '%<%' OR comment_contentLIKE '%>%' )"1316 "SELECT `comment_ID` FROM `{$wpdb->comments}` 1317 WHERE `comment_date_gmt` > '2015-04-26' 1318 AND LENGTH( `comment_content` ) >= {$allowed_length} 1319 AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )" 1296 1320 ); 1297 1321
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)