4.2: When upgrading, remove any suspicious comments.

Built from https://develop.svn.wordpress.org/branches/4.2@32311


git-svn-id: http://core.svn.wordpress.org/branches/4.2@32282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-04-27 17:10:29 +00:00
parent 5c2b420b29
commit a3a76fe665
4 changed files with 41 additions and 3 deletions

View File

@ -9,7 +9,7 @@
<body>
<h1 id="logo">
<a href="https://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 4.2
<br /> Version 4.2.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>

View File

@ -40,6 +40,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Security Release', 'Security Releases', 1 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue.',
'<strong>Version %1$s</strong> addressed some security issues.', 1 ), '4.2.1' ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_4.2.1' ); ?>
</p>
</div>
<div class="headline-feature feature-video">
<embed type="application/x-shockwave-flash" src="https://v0.wordpress.com/player.swf?v=1.04" width="1000" height="560" wmode="direct" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=e9kH4FzP&amp;isDynamicSeeking=true"></embed>
</div>

View File

@ -527,6 +527,9 @@ function upgrade_all() {
if ( $wp_current_db_version < 31351 )
upgrade_420();
if ( $wp_current_db_version < 31533 )
upgrade_421();
maybe_disable_link_manager();
maybe_disable_automattic_widgets();
@ -1435,6 +1438,33 @@ function upgrade_420() {
}
}
/**
* Execute changes made in WordPress 4.2.1.
*
* @since 4.2.1
*/
function upgrade_421() {
global $wp_current_db_version, $wpdb;
if ( $wp_current_db_version < 31533 ) {
$content_length = $wpdb->get_col_length( $wpdb->comments, 'comment_content' );
if ( ! $content_length ) {
$content_length = 65535;
}
$comments = $wpdb->get_results(
"SELECT comment_ID FROM $wpdb->comments
WHERE comment_date_gmt > '2015-04-26'
AND CHAR_LENGTH( comment_content ) >= $content_length
AND ( comment_content LIKE '%<%' OR comment_content LIKE '%>%' )"
);
foreach ( $comments as $comment ) {
wp_delete_comment( $comment->comment_ID, true );
}
}
}
/**
* Executes network-level upgrade routines.
*

View File

@ -4,14 +4,14 @@
*
* @global string $wp_version
*/
$wp_version = '4.2.1-alpha';
$wp_version = '4.2.1';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 31532;
$wp_db_version = 31533;
/**
* Holds the TinyMCE version