WordPress.org

Make WordPress Core

Ticket #16741: 16741.2.diff

File 16741.2.diff, 1.6 KB (added by nacin, 6 years ago)
  • wp-admin/includes/upgrade.php

     
    459459        if ( $wp_current_db_version < 19389 )
    460460                upgrade_330();
    461461
     462        if ( $wp_current_db_version < 19707 )
     463                upgrade_340();
     464
    462465        maybe_disable_automattic_widgets();
    463466
    464467        update_option( 'db_version', $wp_db_version );
     
    12141217}
    12151218
    12161219/**
     1220 * Execute changes made in WordPress 3.4.
     1221 *
     1222 * @since 3.4.0
     1223 */
     1224function upgrade_340() {
     1225        global $wp_current_db_version, $wpdb;
     1226
     1227        if ( $wp_current_db_version < 19707 ) {
     1228                if ( 'yes' == $wpdb->get_var( "SELECT autoload FROM $wpdb->options WHERE option_name = 'uninstall_plugins'" ) ) {
     1229                        delete_option( 'uninstall_plugins' );
     1230                        add_option( 'uninstall_plugins', $uninstall_plugins, null, 'no' );
     1231                }
     1232        }
     1233}
     1234
     1235/**
    12171236 * Execute network level changes
    12181237 *
    12191238 * @since 3.0.0
  • wp-admin/includes/schema.php

     
    478478
    479479        // 3.1
    480480        'default_post_format' => 0,
     481       
     482        // 3.2
     483        'uninstall_plugins' => array(),
    481484        );
    482485
    483486        // 3.3
     
    494497        }
    495498
    496499        // Set autoload to no for these options
    497         $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys' );
     500        $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' );
    498501
    499502        $existing_options = $wpdb->get_col("SELECT option_name FROM $wpdb->options");
    500503