Make WordPress Core


Ignore:
Timestamp:
02/13/2010 07:09:04 AM (15 years ago)
Author:
dd32
Message:

Correctly save checkbox-style MS options and display "No" checked value correctly. See #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r12978 r13095  
    103103        update_site_option( "dashboard_blog", $dashboard_blog_id );
    104104        $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' );
     105        $checked_options = array('mu_media_buttons', 'menu_items');
     106        foreach ( $checked_options as $option_name ) {
     107            if ( ! isset($_POST[ $option_name ]) )
     108                $_POST[ $option_name ] = array();
     109        }
    105110        foreach ( $options as $option_name ) {
    106111            if ( ! isset($_POST[ $option_name ]) )
Note: See TracChangeset for help on using the changeset viewer.