Eliminate the redundant and confusing comment threading depth of 1. Threading starts at 2 now. fixes #10829

git-svn-id: http://svn.automattic.com/wordpress/trunk@11958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2009-09-22 06:00:46 +00:00
parent 6ed2dfd478
commit a131ad469e
3 changed files with 22 additions and 2 deletions

View File

@ -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

View File

@ -66,7 +66,7 @@ include('admin-header.php');
$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );
$thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
for ( $i = 1; $i <= $maxdeep; $i++ ) {
for ( $i = 2; $i <= $maxdeep; $i++ ) {
$thread_comments_depth .= "<option value='" . esc_attr($i) . "'";
if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
$thread_comments_depth .= ">$i</option>";

View File

@ -15,7 +15,7 @@ $wp_version = '2.9-rare';
*
* @global int $wp_db_version
*/
$wp_db_version = 11943;
$wp_db_version = 11958;
/**
* Holds the TinyMCE version