From 044cf9b83c5b7d5658b5b6c573874ba38e7d92f5 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 13 Feb 2010 07:09:04 +0000 Subject: [PATCH] Correctly save checkbox-style MS options and display "No" checked value correctly. See #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@13095 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/ms-edit.php | 5 +++++ wp-admin/ms-options.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php index 9c6ecb71bb..3f413cf236 100644 --- a/wp-admin/ms-edit.php +++ b/wp-admin/ms-edit.php @@ -102,6 +102,11 @@ switch ( $_GET['action'] ) { } update_site_option( "dashboard_blog", $dashboard_blog_id ); $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' ); + $checked_options = array('mu_media_buttons', 'menu_items'); + foreach ( $checked_options as $option_name ) { + if ( ! isset($_POST[ $option_name ]) ) + $_POST[ $option_name ] = array(); + } foreach ( $options as $option_name ) { if ( ! isset($_POST[ $option_name ]) ) continue; diff --git a/wp-admin/ms-options.php b/wp-admin/ms-options.php index 80f525b742..129c7f0ce0 100644 --- a/wp-admin/ms-options.php +++ b/wp-admin/ms-options.php @@ -80,7 +80,7 @@ if (isset($_GET['updated'])) { />
- />
+ />
Add New page.') ?> @@ -210,7 +210,7 @@ if (isset($_GET['updated'])) { -
+