From 55ebce714a023c10f87ce2b68e38c7c5e7c11199 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 22 Mar 2010 06:02:04 +0000 Subject: [PATCH] More ms-options cleanup. Add label elements, and transition to checkboxes from radios where we can. Also fix notice in global_terms_enabled post handling. git-svn-id: http://svn.automattic.com/wordpress/trunk@13796 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/ms-edit.php | 8 +++--- wp-admin/ms-options.php | 63 ++++++++++++++++++----------------------- 2 files changed, 32 insertions(+), 39 deletions(-) diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php index df31ce3bf..30077e4d4 100644 --- a/wp-admin/ms-edit.php +++ b/wp-admin/ms-edit.php @@ -108,16 +108,16 @@ switch ( $_GET['action'] ) { } update_site_option( "dashboard_blog", $dashboard_blog_id ); // global terms - if ( !global_terms_enabled() && '1' == $_POST[ 'global_terms_enabled' ] ) { + if ( !global_terms_enabled() && ! empty( $_POST[ 'global_terms_enabled' ] ) ) { require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); // create global terms table install_global_terms(); } $options = array( 'registrationnotification', 'registration', 'add_new_users', 'menu_items', 'mu_media_buttons', 'upload_space_check_disabled', 'blog_upload_space', 'upload_filetypes', 'site_name', 'first_post', 'first_page', 'first_comment', 'first_comment_url', 'first_comment_author', 'welcome_email', 'welcome_user_email', 'fileupload_maxk', 'admin_notice_feed', 'global_terms_enabled' ); - $checked_options = array('mu_media_buttons', 'menu_items'); - foreach ( $checked_options as $option_name ) { + $checked_options = array('mu_media_buttons' => array(), 'menu_items' => array(), 'registrationnotification' => 'no', 'upload_space_check_disabled' => 1 ); + foreach ( $checked_options as $option_name => $option_unchecked_value ) { if ( ! isset($_POST[ $option_name ]) ) - $_POST[ $option_name ] = array(); + $_POST[ $option_name ] = $option_unchecked_value; } foreach ( $options as $option_name ) { if ( ! isset($_POST[ $option_name ]) ) diff --git a/wp-admin/ms-options.php b/wp-admin/ms-options.php index 73cbdbb70..29c36e6e7 100644 --- a/wp-admin/ms-options.php +++ b/wp-admin/ms-options.php @@ -27,7 +27,7 @@ if (isset($_GET['updated'])) {

- + - + +
+

@@ -36,26 +36,25 @@ if (isset($_GET['updated'])) {

- domain ); ?> + support@%s is recommended.' ), $current_site->domain ); ?>
-
-
-

- + - + - + - + - + - + - +
- @@ -82,7 +81,7 @@ if (isset($_GET['updated'])) {


domain . $current_site->path . 'feed/' ) @@ -116,24 +115,19 @@ if (isset($_GET['updated'])) { update_site_option( 'registrationnotification', 'yes' ); ?>
- />
- />
- +
- - />
- />
- Add New" page.') ?> +
" size="45" />
@@ -142,7 +136,7 @@ if (isset($_GET['updated'])) {
@@ -153,7 +147,7 @@ if (isset($_GET['updated'])) {

@@ -166,7 +160,7 @@ if (isset($_GET['updated'])) { - + - + - + - + - + - + - + - +

@@ -174,7 +168,7 @@ if (isset($_GET['updated'])) {

@@ -182,7 +176,7 @@ if (isset($_GET['updated'])) {

@@ -190,7 +184,7 @@ if (isset($_GET['updated'])) {

@@ -198,7 +192,7 @@ if (isset($_GET['updated'])) {

@@ -206,7 +200,7 @@ if (isset($_GET['updated'])) {

@@ -214,7 +208,7 @@ if (isset($_GET['updated'])) {

@@ -225,7 +219,7 @@ if (isset($_GET['updated'])) {

- + +
- + - - + +


@@ -236,18 +230,17 @@ if (isset($_GET['updated'])) {
-
-
KB' ); ?>
@@ -262,7 +255,7 @@ if (isset($_GET['updated'])) {