WordPress.org

Make WordPress Core

Changeset 22911


Ignore:
Timestamp:
11/29/2012 12:37:30 AM (8 years ago)
Author:
nacin
Message:

Fix disabling of the link manager on upgrade from 3.4.2 when there are no links.

In the 3.4 branch we bumped the DB version past the version used for disabling links in trunk, preventing it from running. In the future, we must avoid increasing branch DB version bumps to HEAD.

props SergeyBiryukov.
fixes #22626.

File:
1 edited

Legend:

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

    r22422 r22911  
    11901190    global $wp_current_db_version, $wpdb;
    11911191
    1192     if ( $wp_current_db_version < 21501 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
     1192    if ( $wp_current_db_version < 22006 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
    11931193        update_option( 'link_manager_enabled', 1 ); // Previously set to 0 by populate_options()
    11941194
     
    19491949    global $wp_current_db_version, $wpdb;
    19501950
    1951     if ( $wp_current_db_version >= 21501 && get_option( 'link_manager_enabled' ) && ! $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
     1951    if ( $wp_current_db_version >= 22006 && get_option( 'link_manager_enabled' ) && ! $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) )
    19521952        update_option( 'link_manager_enabled', 0 );
    19531953}
Note: See TracChangeset for help on using the changeset viewer.