Make WordPress Core

Ticket #39459: 39459.1.diff

File 39459.1.diff, 906 bytes (added by elrae, 5 years ago)

The patch here needed a refresh so added 39459.1.diff which should apply cleanly to 5.5 trunk. Left the conditionals on one line since multiple statements are on one line in other parts of core.

  • wp-admin/admin.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    3535
    3636nocache_headers();
    3737
    38 if ( get_option( 'db_upgraded' ) ) {
     38if ( ! wp_doing_ajax() && get_option( 'db_upgraded' ) ) {
    3939        flush_rewrite_rules();
    4040        update_option( 'db_upgraded', false );
    4141
     
    4545         * @since 2.8.0
    4646         */
    4747        do_action( 'after_db_upgrade' );
    48 } elseif ( get_option( 'db_version' ) != $wp_db_version && empty( $_POST ) ) {
     48} elseif ( ! wp_doing_ajax() && get_option( 'db_version' ) != $wp_db_version && empty( $_POST ) ) {
    4949        if ( ! is_multisite() ) {
    5050                wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
    5151                exit;