diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 090ef1a63..06c0ff894 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -346,6 +346,9 @@ function upgrade_all() { if ( $wp_current_db_version < 10360 ) upgrade_280(); + if ( $wp_current_db_version < 11958 ) + upgrade_290(); + maybe_disable_automattic_widgets(); update_option( 'db_version', $wp_db_version ); @@ -983,6 +986,23 @@ function upgrade_280() { populate_roles_280(); } +/** + * Execute changes made in WordPress 2.9. + * + * @since 2.9.0 + */ +function upgrade_290() { + global $wp_current_db_version; + + if ( $wp_current_db_version < 11958 ) { + // Previously, setting depth to 1 would redundantly disable threading, but now 2 is the minimum depth to avoid confusion + if ( get_option( 'thread_comments_depth' ) == '1' ) { + update_option( 'thread_comments_depth', 2 ); + update_option( 'thread_comments', 0 ); + } + } +} + // The functions we use to actually do stuff diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index f6cc7747f..8093d1593 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -66,7 +66,7 @@ include('admin-header.php'); $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 ); $thread_comments_depth = '