Make WordPress Core

Ticket #51723: 51723.diff

File 51723.diff, 2.4 KB (added by SergeyBiryukov, 4 years ago)
  • src/wp-admin/includes/upgrade.php

     
    874874                upgrade_550();
    875875        }
    876876
    877         if ( $wp_current_db_version < 49572 ) {
     877        if ( $wp_current_db_version < 49602 ) {
    878878                upgrade_560();
    879879        }
    880880
     
    22472247 * @since 5.6.0
    22482248 */
    22492249function upgrade_560() {
    2250         global $wpdb;
     2250        global $wp_current_db_version, $wpdb;
    22512251
    2252         // Clean up the `post_category` column removed from schema in version 2.8.0.
    2253         // Its presence may conflict with WP_Post::__get().
    2254         $post_category_exists = $wpdb->get_var( "SHOW COLUMNS FROM $wpdb->posts LIKE 'post_category'" );
    2255         if ( ! is_null( $post_category_exists ) ) {
    2256                 $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" );
     2252        if ( $wp_current_db_version < 49572 ) {
     2253                /*
     2254                 * Clean up the `post_category` column removed from schema in version 2.8.0.
     2255                 * Its presence may conflict with `WP_Post::__get()`.
     2256                 */
     2257                $post_category_exists = $wpdb->get_var( "SHOW COLUMNS FROM $wpdb->posts LIKE 'post_category'" );
     2258                if ( ! is_null( $post_category_exists ) ) {
     2259                        $wpdb->query( "ALTER TABLE $wpdb->posts DROP COLUMN `post_category`" );
     2260                }
     2261
     2262                /*
     2263                 * When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default.
     2264                 * This overrides the same option from populate_options() that is intended for new installs.
     2265                 * See https://core.trac.wordpress.org/ticket/51742.
     2266                 */
     2267                update_option( 'auto_update_core_major', 'unset' );
    22572268        }
    22582269
    2259         // When upgrading from WP < 5.6.0 set the core major auto-updates option to `unset` by default.
    2260         // This overrides the same option from populate_options() that is intended for new installs.
    2261         // See https://core.trac.wordpress.org/ticket/51742.
    2262         update_option( 'auto_update_core_major', 'unset' );
     2270        if ( $wp_current_db_version < 49602 ) {
     2271                /*
     2272                 * Regenerate the .htaccess file to add the `HTTP_AUTHORIZATION` rewrite rule.
     2273                 * See https://core.trac.wordpress.org/ticket/51723.
     2274                 */
     2275                save_mod_rewrite_rules();
     2276        }
    22632277}
    22642278
    22652279/**
  • src/wp-includes/version.php

     
    2020 *
    2121 * @global int $wp_db_version
    2222 */
    23 $wp_db_version = 49572;
     23$wp_db_version = 49602;
    2424
    2525/**
    2626 * Holds the TinyMCE version.