Restore radios for MS site flags, as the schema supports other values. see #12832

git-svn-id: http://svn.automattic.com/wordpress/trunk@14277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-28 08:15:45 +00:00
parent 033aac697c
commit bebdadc1b0
2 changed files with 14 additions and 15 deletions

View File

@ -248,9 +248,6 @@ switch ( $_GET['action'] ) {
// update blogs table // update blogs table
$blog_data = stripslashes_deep( $_POST['blog'] ); $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 ); update_blog_details( $id, $blog_data );
// get blog prefix // get blog prefix

View File

@ -120,24 +120,26 @@ switch ( $action ) {
<th scope="row"><?php _e('Last Updated') ?></th> <th scope="row"><?php _e('Last Updated') ?></th>
<td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td> <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td>
</tr> </tr>
<tr>
<th scope="row"><?php _e( 'Site Settings' ); ?></th>
<td>
<?php <?php
$checked_fields = array( 'public' => __( 'Public' ) ); $radio_fields = array( 'public' => __( 'Public' ) );
if ( ! $is_main_site ) { if ( ! $is_main_site ) {
$checked_fields['archived'] = __( 'Archived' ); $radio_fields['archived'] = __( 'Archived' );
$checked_fields['spam'] = __( 'Spam' ); $radio_fields['spam'] = __( 'Spam' );
$checked_fields['deleted'] = __( 'Deleted' ); $radio_fields['deleted'] = __( 'Deleted' );
} }
$checked_fields['mature'] = __( 'Mature' ); $radio_fields['mature'] = __( 'Mature' );
foreach ( $checked_fields as $field_key => $field_label ) { foreach ( $radio_fields as $field_key => $field_label ) {
?> ?>
<input type="checkbox" name="blog[<?php echo $field_key; ?>]" id="blog_<?php echo $field_key; ?>" value="1"<?php checked( $details->$field_key ); ?> /> <tr>
<label for="blog_<?php echo $field_key; ?>"><?php echo $field_label; ?></label><br/> <th scope="row"><?php echo $field_label; ?></th>
<?php } ?> <td>
<input type="radio" name="blog[<?php echo $field_key; ?>]" id="blog_<?php $field_key; ?>_1" value="1"<?php checked( $details->$field_key, 1 ); ?> />
<label for="blog_<?php echo $field_key; ?>_1"><?php _e('Yes'); ?></label>
<input type="radio" name="blog[<?php echo $field_key; ?>]" id="blog_<?php $field_key; ?>_0" value="0"<?php checked( $details->$field_key, 0 ); ?> />
<label for="blog_<?php echo $field_key; ?>"><?php _e('No'); ?></label>
</td> </td>
</tr> </tr>
<?php } ?>
</table> </table>
<p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p> <p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p>
</div> </div>