Changeset 32391 for branches/3.7/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 07:16:41 PM (11 years ago)
- File:
-
- 1 edited
-
branches/3.7/src/wp-admin/includes/upgrade.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7/src/wp-admin/includes/upgrade.php
r32318 r32391 412 412 upgrade_373(); 413 413 414 if ( $wp_current_db_version < 26150 ) 415 upgrade_378(); 414 if ( $wp_current_db_version < 26151 ) 416 415 417 416 maybe_disable_link_manager(); … … 1279 1278 */ 1280 1279 function upgrade_378() { 1280 } 1281 1282 /** 1283 * Execute changes made in WordPress 3.7.9. 1284 * 1285 * @since 3.7.9 1286 */ 1287 function upgrade_379() { 1281 1288 global $wp_current_db_version, $wpdb; 1282 1289 1283 if ( $wp_current_db_version < 2615 0) {1290 if ( $wp_current_db_version < 26151 ) { 1284 1291 $content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' ); 1285 if ( ! $content_length ) { 1286 $content_length = 65535; 1287 } 1292 if ( false === $content_length ) { 1293 $content_length = array( 1294 'type' => 'byte', 1295 'length' => 65535, 1296 ); 1297 } elseif ( ! is_array( $content_length ) ) { 1298 $length = (int) $content_length > 0 ? (int) $content_length : 65535; 1299 $content_length = array( 1300 'type' => 'byte', 1301 'length' => $length 1302 ); 1303 } 1304 1305 if ( 'byte' !== $content_length['type'] ) { 1306 // Sites with malformed DB schemas are on their own. 1307 return; 1308 } 1309 1310 $allowed_length = intval( $content_length['length'] ) - 10; 1288 1311 1289 1312 $comments = $wpdb->get_results( 1290 "SELECT comment_ID FROM $wpdb->comments1291 WHERE comment_date_gmt> '2015-04-26'1292 AND CHAR_LENGTH( comment_content ) >= $content_length1293 AND ( comment_content LIKE '%<%' OR comment_contentLIKE '%>%' )"1313 "SELECT `comment_ID` FROM `{$wpdb->comments}` 1314 WHERE `comment_date_gmt` > '2015-04-26' 1315 AND LENGTH( `comment_content` ) >= {$allowed_length} 1316 AND ( `comment_content` LIKE '%<%' OR `comment_content` LIKE '%>%' )" 1294 1317 ); 1295 1318
Note: See TracChangeset
for help on using the changeset viewer.