<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14734] trunk/wp-admin:
Cast global_terms_enabled to bool before doing checked()
so that FALSE matches as well as 0.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14734">14734</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2010-05-19 05:12:01 +0000 (Wed, 19 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Cast global_terms_enabled to bool before doing checked() so that FALSE matches as well as 0.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmseditphp">trunk/wp-admin/ms-edit.php</a></li>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpadminmsusersphp">trunk/wp-admin/ms-users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminmseditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-edit.php (14733 => 14734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-edit.php        2010-05-19 03:42:55 UTC (rev 14733)
+++ trunk/wp-admin/ms-edit.php        2010-05-19 05:12:01 UTC (rev 14734)
</span><span class="lines">@@ -141,7 +141,7 @@
</span><span class="cx">                 exit();
</span><span class="cx">         break;
</span><span class="cx">         case 'addblog':
</span><del>-                check_admin_referer( 'add-blog' );
</del><ins>+                check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
</ins><span class="cx">
</span><span class="cx">                 if ( ! current_user_can( 'manage_sites' ) )
</span><span class="cx">                         wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx">
</span><span class="cx">         case 'allblogs':
</span><span class="cx">                 if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) {
</span><del>-                        check_admin_referer( 'bulk-ms-sites' );
</del><ins>+                        check_admin_referer( 'bulk-ms-sites', '_wpnonce_bulk-ms-sites' );
</ins><span class="cx">
</span><span class="cx">                         if ( ! current_user_can( 'manage_sites' ) )
</span><span class="cx">                                 wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx">                         wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="cx">
</span><span class="cx">                 if ( isset( $_POST['doaction']) || isset($_POST['doaction2'] ) ) {
</span><del>-                        check_admin_referer( 'bulk-ms-users' );
</del><ins>+                        check_admin_referer( 'bulk-ms-users', '_wpnonce_bulk-ms-users' );
</ins><span class="cx">
</span><span class="cx">                         if ( $_GET['action'] != -1 || $_POST['action2'] != -1 )
</span><span class="cx">                                 $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx">         break;
</span><span class="cx">
</span><span class="cx">         case 'adduser':
</span><del>-                check_admin_referer( 'add-user' );
</del><ins>+                check_admin_referer( 'add-user', '_wpnonce_add-user' );
</ins><span class="cx">                 if ( ! current_user_can( 'manage_network_users' ) )
</span><span class="cx">                         wp_die( __( 'You do not have permission to access this page.' ) );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (14733 => 14734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-05-19 03:42:55 UTC (rev 14733)
+++ trunk/wp-admin/ms-options.php        2010-05-19 05:12:01 UTC (rev 14734)
</span><span class="lines">@@ -55,8 +55,8 @@
</span><span class="cx">                         <tr valign="top">
</span><span class="cx">                                 <th scope="row"><?php _e( 'Global Terms' ) ?></th>
</span><span class="cx">                                 <td>
</span><del>-                                <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 />
</del><ins>+                                <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 />
</ins><span class="cx">                                 <?php if ( ! get_site_option( 'global_terms_enabled') ) { ?>
</span><span class="cx">                                 <strong><?php _e( 'Warning!' ); ?></strong> <?php _e( 'Enabling global terms will create a new table and synchronize terms across the network.' ); ?>
</span><span class="cx">                                 <?php } ?></td>
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (14733 => 14734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-05-19 03:42:55 UTC (rev 14733)
+++ trunk/wp-admin/ms-sites.php        2010-05-19 05:12:01 UTC (rev 14734)
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx">                                 <option value="notspam"><?php _ex( 'Not Spam', 'site' ); ?></option>
</span><span class="cx">                         </select>
</span><span class="cx">                         <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
</span><del>-                        <?php wp_nonce_field( 'bulk-ms-sites' ); ?>
</del><ins>+                        <?php wp_nonce_field( 'bulk-ms-sites', '_wpnonce_bulk-ms-sites' ); ?>
</ins><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx">                 <?php if ( $page_links ) { ?>
</span><span class="lines">@@ -679,7 +679,7 @@
</span><span class="cx">                 <div id="form-add-site" class="wrap">
</span><span class="cx">                         <h3><?php _e( 'Add Site' ) ?></h3>
</span><span class="cx">                         <form method="post" action="ms-edit.php?action=addblog">
</span><del>-                                <?php wp_nonce_field( 'add-blog' ) ?>
</del><ins>+                                <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
</ins><span class="cx">                                 <table class="form-table">
</span><span class="cx">                                         <tr class="form-field form-required">
</span><span class="cx">                                                 <th scope="row"><?php _e( 'Site Address' ) ?></th>
</span></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (14733 => 14734)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-05-19 03:42:55 UTC (rev 14733)
+++ trunk/wp-admin/ms-users.php        2010-05-19 05:12:01 UTC (rev 14734)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">                                         <option value="notspam"><?php _ex( 'Not Spam', 'user' ); ?></option>
</span><span class="cx">                                 </select>
</span><span class="cx">                                 <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
</span><del>-                                <?php wp_nonce_field( 'bulk-ms-users' ); ?>
</del><ins>+                                <?php wp_nonce_field( 'bulk-ms-users', '_wpnonce_bulk-ms-users' ); ?>
</ins><span class="cx">                         </div>
</span><span class="cx">
</span><span class="cx">                         <?php if ( $page_links ) { ?>
</span><span class="lines">@@ -355,7 +355,7 @@
</span><span class="cx">                 </tr>
</span><span class="cx">         </table>
</span><span class="cx">         <p class="submit">
</span><del>-                <?php wp_nonce_field( 'add-user' ) ?>
</del><ins>+                <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
</ins><span class="cx">                 <input class="button" type="submit" value="<?php esc_attr_e( 'Add user' ) ?>" /></p>
</span><span class="cx">         </form>
</span><span class="cx"> </div>
</span></span></pre>
</div>
</div>
</body>
</html>