From c882ea05ac38a07272c7c0905661f339d474f8dd Mon Sep 17 00:00:00 2001 From: nacin Date: Fri, 16 Apr 2010 13:35:44 +0000 Subject: [PATCH] Fix the blog settings checkboxes on ms-sites.php. fixes #12889 git-svn-id: http://svn.automattic.com/wordpress/trunk@14102 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/ms-edit.php | 5 ++++- wp-admin/ms-sites.php | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php index fcf7ce5d9..8a79b0ffe 100644 --- a/wp-admin/ms-edit.php +++ b/wp-admin/ms-edit.php @@ -9,7 +9,7 @@ require_once( './admin.php' ); -if ( !is_multisite() ) +if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( empty( $_GET['action'] ) ) @@ -248,6 +248,9 @@ switch ( $_GET['action'] ) { // update blogs table $blog_data = stripslashes_deep( $_POST['blog'] ); + $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); + foreach ( $blog_data_checkboxes as $c ) + $blog_data[ $c ] = ! empty( $_POST['blog'][ $c ] ); update_blog_details( $id, $blog_data ); // get blog prefix diff --git a/wp-admin/ms-sites.php b/wp-admin/ms-sites.php index 7ecfe35f3..4435a178a 100644 --- a/wp-admin/ms-sites.php +++ b/wp-admin/ms-sites.php @@ -9,7 +9,7 @@ require_once( './admin.php' ); -if ( !is_multisite() ) +if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); if ( ! current_user_can( 'manage_sites' ) ) @@ -124,11 +124,9 @@ switch ( $action ) { __( 'Public' ) ); - else + $checked_fields = array( 'public' => __( 'Public' ) ); + if ( ! $is_main_site ) $checked_fields = array( - 'public' => __( 'Public' ), 'archived' => __( 'Archived' ), 'spam' => __( 'Spam' ), 'deleted' => __( 'Deleted' ), @@ -136,7 +134,7 @@ switch ( $action ) { $checked_fields['mature'] = __( 'Mature' ); foreach ( $checked_fields as $field_key => $field_label ) { ?> - $field_key ); ?> /> + $field_key ); ?> />