mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 11:35:48 +00:00
Cast global_terms_enabled to bool before doing checked() so that FALSE matches as well as 0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8898f513b2
commit
dfc9923e59
@ -141,7 +141,7 @@ switch ( $_GET['action'] ) {
|
||||
exit();
|
||||
break;
|
||||
case 'addblog':
|
||||
check_admin_referer( 'add-blog' );
|
||||
check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
|
||||
|
||||
if ( ! current_user_can( 'manage_sites' ) )
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
@ -325,7 +325,7 @@ switch ( $_GET['action'] ) {
|
||||
|
||||
case 'allblogs':
|
||||
if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) {
|
||||
check_admin_referer( 'bulk-ms-sites' );
|
||||
check_admin_referer( 'bulk-ms-sites', '_wpnonce_bulk-ms-sites' );
|
||||
|
||||
if ( ! current_user_can( 'manage_sites' ) )
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
@ -507,7 +507,7 @@ switch ( $_GET['action'] ) {
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
|
||||
if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) {
|
||||
check_admin_referer( 'bulk-ms-users' );
|
||||
check_admin_referer( 'bulk-ms-users', '_wpnonce_bulk-ms-users' );
|
||||
|
||||
if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
|
||||
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
||||
@ -590,7 +590,7 @@ switch ( $_GET['action'] ) {
|
||||
break;
|
||||
|
||||
case 'adduser':
|
||||
check_admin_referer( 'add-user' );
|
||||
check_admin_referer( 'add-user', '_wpnonce_add-user' );
|
||||
if ( ! current_user_can( 'manage_network_users' ) )
|
||||
wp_die( __( 'You do not have permission to access this page.' ) );
|
||||
|
||||
|
@ -55,8 +55,8 @@ if (isset($_GET['updated'])) {
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e( 'Global Terms' ) ?></th>
|
||||
<td>
|
||||
<label><input type="radio" name="global_terms_enabled" value="0"<?php checked( get_site_option( 'global_terms_enabled' ), 0 ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
|
||||
<label><input type="radio" name="global_terms_enabled" value="1"<?php checked( get_site_option( 'global_terms_enabled' ), 1 ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
|
||||
<label><input type="radio" name="global_terms_enabled" value="0"<?php checked( !! get_site_option( 'global_terms_enabled' ), false ) ?>/> <?php _e( 'Disabled' ); ?></label><br/>
|
||||
<label><input type="radio" name="global_terms_enabled" value="1"<?php checked( !! get_site_option( 'global_terms_enabled' ), true ) ?>/> <?php _e( 'Maintain a global list of terms from all sites across the network.' ); ?></label><br />
|
||||
<?php if ( ! get_site_option( 'global_terms_enabled') ) { ?>
|
||||
<strong><?php _e( 'Warning!' ); ?></strong> <?php _e( 'Enabling global terms will create a new table and synchronize terms across the network.' ); ?>
|
||||
<?php } ?></td>
|
||||
|
@ -418,7 +418,7 @@ switch ( $action ) {
|
||||
<option value="notspam"><?php _ex( 'Not Spam', 'site' ); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
|
||||
<?php wp_nonce_field( 'bulk-ms-sites' ); ?>
|
||||
<?php wp_nonce_field( 'bulk-ms-sites', '_wpnonce_bulk-ms-sites' ); ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $page_links ) { ?>
|
||||
@ -679,7 +679,7 @@ switch ( $action ) {
|
||||
<div id="form-add-site" class="wrap">
|
||||
<h3><?php _e( 'Add Site' ) ?></h3>
|
||||
<form method="post" action="ms-edit.php?action=addblog">
|
||||
<?php wp_nonce_field( 'add-blog' ) ?>
|
||||
<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
|
||||
<table class="form-table">
|
||||
<tr class="form-field form-required">
|
||||
<th scope="row"><?php _e( 'Site Address' ) ?></th>
|
||||
|
@ -134,7 +134,7 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
|
||||
<option value="notspam"><?php _ex( 'Not Spam', 'user' ); ?></option>
|
||||
</select>
|
||||
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
|
||||
<?php wp_nonce_field( 'bulk-ms-users' ); ?>
|
||||
<?php wp_nonce_field( 'bulk-ms-users', '_wpnonce_bulk-ms-users' ); ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $page_links ) { ?>
|
||||
@ -355,7 +355,7 @@ if ( apply_filters( 'show_adduser_fields', true ) ) :
|
||||
</tr>
|
||||
</table>
|
||||
<p class="submit">
|
||||
<?php wp_nonce_field( 'add-user' ) ?>
|
||||
<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
|
||||
<input class="button" type="submit" value="<?php esc_attr_e( 'Add user' ) ?>" /></p>
|
||||
</form>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user