<!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>[13965] trunk/wp-admin: Some more MS cleanups.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13965">13965</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-04-03 11:15:51 +0000 (Sat, 03 Apr 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Some more MS cleanups. see <a href="http://trac.wordpress.org/ticket/12460">#12460</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmsadminphp">trunk/wp-admin/ms-admin.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="trunkwpadminmsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-admin.php (13964 => 13965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-admin.php        2010-04-03 10:23:17 UTC (rev 13964)
+++ trunk/wp-admin/ms-admin.php        2010-04-03 11:15:51 UTC (rev 13965)
</span><span class="lines">@@ -1,23 +1,17 @@
</span><span class="cx"> <?php
</span><del>-require_once('admin.php');
</del><ins>+require_once( './admin.php' );
</ins><span class="cx">
</span><span class="cx"> if ( !is_multisite() )
</span><del>-        wp_die( __('Multisite support is not enabled.') );
</del><ins>+        wp_die( __( 'Multisite support is not enabled.' ) );
</ins><span class="cx">
</span><del>-$title = __('Network Admin');
</del><ins>+if ( ! current_user_can( 'manage_network' ) )
+        wp_die( __( 'You do not have permission to access this page.' ) );
+
+$title = __( 'Network Admin' );
</ins><span class="cx"> $parent_file = 'ms-admin.php';
</span><span class="cx">
</span><del>-function index_css() {
-        wp_admin_css( 'css/dashboard' );
-}
-add_action( 'admin_head', 'index_css' );
</del><ins>+require_once( './admin-header.php' );
</ins><span class="cx">
</span><del>-require_once('admin-header.php');
-
-if ( ! current_user_can( 'manage_network' ) )
-        wp_die( __('You do not have permission to access this page.') );
-
-global $wpdb;
</del><span class="cx"> $c_users = get_user_count();
</span><span class="cx"> $c_blogs = get_blog_count();
</span><span class="cx">
</span><span class="lines">@@ -32,19 +26,19 @@
</span><span class="cx">         <h2><?php echo esc_html( $title ); ?></h2>
</span><span class="cx">
</span><span class="cx">         <ul class="subsubsub">
</span><del>-        <li><a href="ms-sites.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Site'); ?></strong></a> | </li>
-        <li><a href="ms-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a></li>
</del><ins>+        <li><a href="ms-sites.php#form-add-site"><?php _e( 'Create a New Site' ); ?></a> |</li>
+        <li><a href="ms-users.php#form-add-user"><?php _e( 'Create a New User' ); ?></a></li>
</ins><span class="cx">         </ul>
</span><del>-        <br clear='all' />
</del><ins>+        <br class="clear" />
</ins><span class="cx">
</span><span class="cx">         <p class="youhave"><?php echo $sentence; ?></p>
</span><del>-        <?php do_action('wpmuadminresult', ''); ?>
</del><ins>+        <?php do_action( 'wpmuadminresult', '' ); ?>
</ins><span class="cx">
</span><span class="cx">         <form name="searchform" action="ms-users.php" method="get">
</span><span class="cx">                 <p>
</span><span class="cx">                         <input type="hidden" name="action" value="users" />
</span><span class="cx">                         <input type="text" name="s" value="" size="17" />
</span><del>-                        <input class="button" type="submit" name="submit" value="<?php esc_attr_e("Search Users"); ?>" />
</del><ins>+                        <input class="button" type="submit" name="submit" value="<?php esc_attr_e( 'Search Users' ); ?>" />
</ins><span class="cx">                 </p>
</span><span class="cx">         </form>
</span><span class="cx">
</span><span class="lines">@@ -52,13 +46,12 @@
</span><span class="cx">                 <p>
</span><span class="cx">                         <input type="hidden" name="action" value="blogs" />
</span><span class="cx">                         <input type="text" name="s" value="" size="17" />
</span><del>-                        <input class="button" type="submit" name="blog_name" value="<?php esc_attr_e("Search Sites"); ?>" />
</del><ins>+                        <input class="button" type="submit" name="blog_name" value="<?php esc_attr_e( 'Search Sites' ); ?>" />
</ins><span class="cx">                 </p>
</span><span class="cx">         </form>
</span><span class="cx">
</span><span class="cx">         <?php do_action( 'mu_rightnow_end' ); ?>
</span><span class="cx">         <?php do_action( 'mu_activity_box_end' ); ?>
</span><del>-        </div><!-- rightnow -->
</del><span class="cx"> </div>
</span><span class="cx">
</span><del>-<?php include('admin-footer.php'); ?>
</del><ins>+<?php include( './admin-footer.php' ); ?>
</ins></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (13964 => 13965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-04-03 10:23:17 UTC (rev 13964)
+++ trunk/wp-admin/ms-sites.php        2010-04-03 11:15:51 UTC (rev 13965)
</span><span class="lines">@@ -118,42 +118,24 @@
</span><span class="cx">                                                         <th scope="row"><?php _e('Last Updated') ?></th>
</span><span class="cx">                                                         <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr( $details->last_updated ) ?>" size="40" /></td>
</span><span class="cx">                                                 </tr>
</span><ins>+                                                <?php
+                                                if ( $is_main_site )
+                                                        $checked_fields = array( 'public' => __( 'Public' ) );
+                                                else
+                                                        $checked_fields = array(
+                                                                'public' => __('Public'),
+                                                                'archived' => __('Archived'),
+                                                                'spam' => __('Spam'),
+                                                                'deleted' => __('Deleted'),
+                                                                'mature' => __('Mature'),
+                                                        );
+
+                                                foreach ( $checked_fields as $field_key => $field_label ) {
+                                                ?>
</ins><span class="cx">                                                 <tr class="form-field">
</span><del>-                                                        <th scope="row"><?php _e('Public') ?></th>
-                                                        <td>
-                                                                <label><input type="radio" style="width:20px;" name="blog[public]" value="1" <?php checked( $details->public, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>
-                                                                <label><input type="radio" style="width:20px;" name="blog[public]" value="0" <?php checked( $details->public, 0 ); ?> /> <?php _e( 'No' ) ?></label>
-                                                        </td>
</del><ins>+                                                        <th scope="row"><label for="blog_<?php echo $field_key; ?>"><?php echo $field_label; ?></label></th>
+                                                        <td><input type="checkbox" name="blog[<?php echo $field_key; ?>]" id="blog_<?php echo $field_key; ?>" value="<?php echo $details->$field_key; ?>"<?php checked( $details->$field_key ); ?> /></td>
</ins><span class="cx">                                                 </tr>
</span><del>-                                                <?php if ( ! $is_main_site ) { ?>
-                                                <tr class="form-field">
-                                                        <th scope="row"><?php _e( 'Archived' ); ?></th>
-                                                        <td>
-                                                                <label><input type="radio" style="width:20px;" name="blog[archived]" value="1" <?php checked( $details->archived, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>
-                                                                <label><input type="radio" style="width:20px;" name="blog[archived]" value="0" <?php checked( $details->archived, 0 ); ?> /> <?php _e( 'No' ) ?></label>
-                                                        </td>
-                                                </tr>
-                                                <tr class="form-field">
-                                                        <th scope="row"><?php _e( 'Spam' ); ?></th>
-                                                        <td>
-                                                                <label><input type="radio" style="width:20px;" name="blog[spam]" value="1" <?php checked( $details->spam, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>
-                                                                <label><input type="radio" style="width:20px;" name="blog[spam]" value="0" <?php checked( $details->spam, 0 ); ?> /> <?php _e( 'No' ) ?></label>
-                                                        </td>
-                                                </tr>
-                                                <tr class="form-field">
-                                                        <th scope="row"><?php _e( 'Deleted' ); ?></th>
-                                                        <td>
-                                                                <label><input type="radio" style="width:20px;" name="blog[deleted]" value="1" <?php checked( $details->deleted, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>
-                                                                <label><input type="radio" style="width:20px;" name="blog[deleted]" value="0" <?php checked( $details->deleted, 0 ); ?> /> <?php _e( 'No' ) ?></label>
-                                                        </td>
-                                                </tr>
-                                                <tr class="form-field">
-                                                        <th scope="row"><?php _e( 'Mature' ); ?></th>
-                                                        <td>
-                                                                <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>
-                                                                <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label>
-                                                        </td>
-                                                </tr>
</del><span class="cx">                                                 <?php } ?>
</span><span class="cx">                                         </table>
</span><span class="cx">                                         <p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p>
</span><span class="lines">@@ -691,9 +673,8 @@
</span><span class="cx">                 </form>
</span><span class="cx">                 </div>
</span><span class="cx">
</span><del>-                <div class="wrap">
-                        <a name="form-add-site"></a>
-                        <h2><?php _e( 'Add Site' ) ?></h2>
</del><ins>+                <div id="form-add-site" class="wrap">
+                        <h3><?php _e( 'Add Site' ) ?></h3>
</ins><span class="cx">                         <form method="post" action="ms-edit.php?action=addblog">
</span><span class="cx">                                 <?php wp_nonce_field( 'add-blog' ) ?>
</span><span class="cx">                                 <table class="form-table">
</span></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (13964 => 13965)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-04-03 10:23:17 UTC (rev 13964)
+++ trunk/wp-admin/ms-users.php        2010-04-03 11:15:51 UTC (rev 13965)
</span><span class="lines">@@ -330,9 +330,9 @@
</span><span class="cx"> <?php
</span><span class="cx"> if ( apply_filters( 'show_adduser_fields', true ) ) :
</span><span class="cx"> ?>
</span><del>-<div class="wrap">
-        <h2><?php _e( 'Add user' ) ?></h2>
-        <form action="ms-edit.php?action=adduser" method="post" id="form-add-user">
</del><ins>+<div class="wrap" id="form-add-user">
+        <h3><?php _e( 'Add User' ) ?></h3>
+        <form action="ms-edit.php?action=adduser" method="post">
</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( 'Username' ) ?></th>
</span></span></pre>
</div>
</div>
</body>
</html>