WordPress.org

Make WordPress Core

Changeset 48405


Ignore:
Timestamp:
07/08/2020 10:56:22 AM (3 months ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Prevent the upgrade routine for updating the comment_type field in the comments table from running twice.

Follow-up to [47597], [48400].

See #50413, #49236.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r48400 r48405  
    701701function upgrade_all() {
    702702    global $wp_current_db_version, $wp_db_version;
     703
    703704    $wp_current_db_version = __get_option( 'db_version' );
    704705
     
    18711872function upgrade_370() {
    18721873    global $wp_current_db_version;
     1874
    18731875    if ( $wp_current_db_version < 25824 ) {
    18741876        wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
     
    18871889function upgrade_372() {
    18881890    global $wp_current_db_version;
     1891
    18891892    if ( $wp_current_db_version < 26148 ) {
    18901893        wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
     
    19021905function upgrade_380() {
    19031906    global $wp_current_db_version;
     1907
    19041908    if ( $wp_current_db_version < 26691 ) {
    19051909        deactivate_plugins( array( 'mp6/mp6.php' ), true );
     
    19171921function upgrade_400() {
    19181922    global $wp_current_db_version;
     1923
    19191924    if ( $wp_current_db_version < 29630 ) {
    19201925        if ( ! is_multisite() && false === get_option( 'WPLANG' ) ) {
     
    21692174    global $wp_current_db_version;
    21702175
    2171     update_option( 'finished_updating_comment_type', 0 );
    2172     wp_schedule_single_event( time() + ( 1 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
    2173 
    21742176    if ( $wp_current_db_version < 48121 ) {
     2177        update_option( 'finished_updating_comment_type', 0 );
     2178        wp_schedule_single_event( time() + ( 1 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
     2179
    21752180        // Use more clear and inclusive language.
    21762181        $blocklist = get_option( 'blacklist_keys', '' );
Note: See TracChangeset for help on using the changeset viewer.