Upgrade/Install: Prevent some 5.5.0 upgrade routines from running twice.

This will prevent the options renamed for 5.5.0 from being converted twice. If a new update routine is added before 5.5 is released, the option values would be erased for anyone running `trunk` or nightlies without this change.

Props azaozz, desrosj, SergeyBiryukov, whyisjake.
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48400 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2020-07-07 19:19:03 +00:00
parent 61803a37a4
commit 7d3b647a16
1 changed files with 11 additions and 7 deletions

View File

@ -2166,9 +2166,12 @@ function upgrade_530() {
* @since 5.5.0
*/
function upgrade_550() {
global $wp_current_db_version;
update_option( 'finished_updating_comment_type', 0 );
wp_schedule_single_event( time() + ( 1 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
if ( $wp_current_db_version < 48121 ) {
// Use more clear and inclusive language.
$blocklist = get_option( 'blacklist_keys', '' );
update_option( 'blocklist_keys', $blocklist );
@ -2178,6 +2181,7 @@ function upgrade_550() {
update_option( 'comment_previously_approved', $comment_previously_approved );
delete_option( 'comment_whitelist' );
}
}
/**
* Executes network-level upgrade routines.