<!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"> &lt;?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">         &lt;h2&gt;&lt;?php echo esc_html( $title ); ?&gt;&lt;/h2&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;ul class=&quot;subsubsub&quot;&gt;
</span><del>-        &lt;li&gt;&lt;a href=&quot;ms-sites.php#form-add-blog&quot; class=&quot;rbutton&quot;&gt;&lt;strong&gt;&lt;?php _e('Create a New Site'); ?&gt;&lt;/strong&gt;&lt;/a&gt; | &lt;/li&gt;
-        &lt;li&gt;&lt;a href=&quot;ms-users.php#form-add-user&quot; class=&quot;rbutton&quot;&gt;&lt;?php _e('Create a New User'); ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+        &lt;li&gt;&lt;a href=&quot;ms-sites.php#form-add-site&quot;&gt;&lt;?php _e( 'Create a New Site' ); ?&gt;&lt;/a&gt; |&lt;/li&gt;
+        &lt;li&gt;&lt;a href=&quot;ms-users.php#form-add-user&quot;&gt;&lt;?php _e( 'Create a New User' ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">         &lt;/ul&gt;
</span><del>-        &lt;br clear='all' /&gt;
</del><ins>+        &lt;br class=&quot;clear&quot; /&gt;
</ins><span class="cx"> 
</span><span class="cx">         &lt;p class=&quot;youhave&quot;&gt;&lt;?php echo $sentence; ?&gt;&lt;/p&gt;
</span><del>-        &lt;?php do_action('wpmuadminresult', ''); ?&gt;
</del><ins>+        &lt;?php do_action( 'wpmuadminresult', '' ); ?&gt;
</ins><span class="cx"> 
</span><span class="cx">         &lt;form name=&quot;searchform&quot; action=&quot;ms-users.php&quot; method=&quot;get&quot;&gt;
</span><span class="cx">                 &lt;p&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;users&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;text&quot; name=&quot;s&quot; value=&quot;&quot; size=&quot;17&quot; /&gt;
</span><del>-                        &lt;input class=&quot;button&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e(&quot;Search Users&quot;); ?&gt;&quot; /&gt;
</del><ins>+                        &lt;input class=&quot;button&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e( 'Search Users' ); ?&gt;&quot; /&gt;
</ins><span class="cx">                 &lt;/p&gt;
</span><span class="cx">         &lt;/form&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -52,13 +46,12 @@
</span><span class="cx">                 &lt;p&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;blogs&quot; /&gt;
</span><span class="cx">                         &lt;input type=&quot;text&quot; name=&quot;s&quot; value=&quot;&quot; size=&quot;17&quot; /&gt;
</span><del>-                        &lt;input class=&quot;button&quot; type=&quot;submit&quot; name=&quot;blog_name&quot; value=&quot;&lt;?php esc_attr_e(&quot;Search Sites&quot;); ?&gt;&quot; /&gt;
</del><ins>+                        &lt;input class=&quot;button&quot; type=&quot;submit&quot; name=&quot;blog_name&quot; value=&quot;&lt;?php esc_attr_e( 'Search Sites' ); ?&gt;&quot; /&gt;
</ins><span class="cx">                 &lt;/p&gt;
</span><span class="cx">         &lt;/form&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;?php do_action( 'mu_rightnow_end' ); ?&gt;
</span><span class="cx">         &lt;?php do_action( 'mu_activity_box_end' ); ?&gt;
</span><del>-        &lt;/div&gt;&lt;!-- rightnow --&gt;
</del><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><del>-&lt;?php include('admin-footer.php'); ?&gt;
</del><ins>+&lt;?php include( './admin-footer.php' ); ?&gt;
</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">                                                         &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Last Updated') ?&gt;&lt;/th&gt;
</span><span class="cx">                                                         &lt;td&gt;&lt;input name=&quot;blog[last_updated]&quot; type=&quot;text&quot; id=&quot;blog_last_updated&quot; value=&quot;&lt;?php echo esc_attr( $details-&gt;last_updated ) ?&gt;&quot; size=&quot;40&quot; /&gt;&lt;/td&gt;
</span><span class="cx">                                                 &lt;/tr&gt;
</span><ins>+                                                &lt;?php
+                                                if ( $is_main_site )
+                                                        $checked_fields = array( 'public' =&gt; __( 'Public' ) );
+                                                else
+                                                        $checked_fields = array(
+                                                                'public'   =&gt; __('Public'),
+                                                                'archived' =&gt; __('Archived'),
+                                                                'spam'     =&gt; __('Spam'),
+                                                                'deleted'  =&gt; __('Deleted'),
+                                                                'mature'  =&gt; __('Mature'),
+                                                        );
+
+                                                foreach ( $checked_fields as $field_key =&gt; $field_label ) {
+                                                ?&gt;
</ins><span class="cx">                                                 &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Public') ?&gt;&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[public]&quot; value=&quot;1&quot; &lt;?php checked( $details-&gt;public, 1 ); ?&gt; /&gt; &lt;?php _e( 'Yes' ) ?&gt;&lt;/label&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[public]&quot; value=&quot;0&quot; &lt;?php checked( $details-&gt;public, 0 ); ?&gt; /&gt; &lt;?php _e( 'No' ) ?&gt;&lt;/label&gt;
-                                                        &lt;/td&gt;
</del><ins>+                                                        &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;blog_&lt;?php echo $field_key; ?&gt;&quot;&gt;&lt;?php echo $field_label; ?&gt;&lt;/label&gt;&lt;/th&gt;
+                                                        &lt;td&gt;&lt;input type=&quot;checkbox&quot; name=&quot;blog[&lt;?php echo $field_key; ?&gt;]&quot; id=&quot;blog_&lt;?php echo $field_key; ?&gt;&quot; value=&quot;&lt;?php echo $details-&gt;$field_key; ?&gt;&quot;&lt;?php checked( $details-&gt;$field_key ); ?&gt; /&gt;&lt;/td&gt;
</ins><span class="cx">                                                 &lt;/tr&gt;
</span><del>-                                                &lt;?php if ( ! $is_main_site ) { ?&gt;
-                                                &lt;tr class=&quot;form-field&quot;&gt;
-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Archived' ); ?&gt;&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[archived]&quot; value=&quot;1&quot; &lt;?php checked( $details-&gt;archived, 1 ); ?&gt; /&gt; &lt;?php _e( 'Yes' ) ?&gt;&lt;/label&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[archived]&quot; value=&quot;0&quot; &lt;?php checked( $details-&gt;archived, 0 ); ?&gt; /&gt; &lt;?php _e( 'No' ) ?&gt;&lt;/label&gt;
-                                                        &lt;/td&gt;
-                                                &lt;/tr&gt;
-                                                &lt;tr class=&quot;form-field&quot;&gt;
-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Spam' ); ?&gt;&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[spam]&quot; value=&quot;1&quot; &lt;?php checked( $details-&gt;spam, 1 ); ?&gt; /&gt; &lt;?php _e( 'Yes' ) ?&gt;&lt;/label&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[spam]&quot; value=&quot;0&quot; &lt;?php checked( $details-&gt;spam, 0 ); ?&gt; /&gt; &lt;?php _e( 'No' ) ?&gt;&lt;/label&gt;
-                                                        &lt;/td&gt;
-                                                &lt;/tr&gt;
-                                                &lt;tr class=&quot;form-field&quot;&gt;
-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Deleted' ); ?&gt;&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[deleted]&quot; value=&quot;1&quot; &lt;?php checked( $details-&gt;deleted, 1 ); ?&gt; /&gt; &lt;?php _e( 'Yes' ) ?&gt;&lt;/label&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[deleted]&quot; value=&quot;0&quot; &lt;?php checked( $details-&gt;deleted, 0 ); ?&gt; /&gt; &lt;?php _e( 'No' ) ?&gt;&lt;/label&gt;
-                                                        &lt;/td&gt;
-                                                &lt;/tr&gt;
-                                                &lt;tr class=&quot;form-field&quot;&gt;
-                                                        &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Mature' ); ?&gt;&lt;/th&gt;
-                                                        &lt;td&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[mature]&quot; value=&quot;1&quot; &lt;?php checked( $details-&gt;mature, 1 ); ?&gt; /&gt; &lt;?php _e( 'Yes' ) ?&gt;&lt;/label&gt;
-                                                                &lt;label&gt;&lt;input type=&quot;radio&quot; style=&quot;width:20px;&quot; name=&quot;blog[mature]&quot; value=&quot;0&quot; &lt;?php checked( $details-&gt;mature, 0); ?&gt; /&gt; &lt;?php _e( 'No' ) ?&gt;&lt;/label&gt;
-                                                        &lt;/td&gt;
-                                                &lt;/tr&gt;
</del><span class="cx">                                                 &lt;?php } ?&gt;
</span><span class="cx">                                         &lt;/table&gt;
</span><span class="cx">                                         &lt;p class=&quot;submit&quot; style=&quot;text-align:center;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e( 'Update Options' ) ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="lines">@@ -691,9 +673,8 @@
</span><span class="cx">                 &lt;/form&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                &lt;div class=&quot;wrap&quot;&gt;
-                        &lt;a name=&quot;form-add-site&quot;&gt;&lt;/a&gt;
-                        &lt;h2&gt;&lt;?php _e( 'Add Site' ) ?&gt;&lt;/h2&gt;
</del><ins>+                &lt;div id=&quot;form-add-site&quot; class=&quot;wrap&quot;&gt;
+                        &lt;h3&gt;&lt;?php _e( 'Add Site' ) ?&gt;&lt;/h3&gt;
</ins><span class="cx">                         &lt;form method=&quot;post&quot; action=&quot;ms-edit.php?action=addblog&quot;&gt;
</span><span class="cx">                                 &lt;?php wp_nonce_field( 'add-blog' ) ?&gt;
</span><span class="cx">                                 &lt;table class=&quot;form-table&quot;&gt;
</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"> &lt;?php
</span><span class="cx"> if ( apply_filters( 'show_adduser_fields', true ) ) :
</span><span class="cx"> ?&gt;
</span><del>-&lt;div class=&quot;wrap&quot;&gt;
-        &lt;h2&gt;&lt;?php _e( 'Add user' ) ?&gt;&lt;/h2&gt;
-        &lt;form action=&quot;ms-edit.php?action=adduser&quot; method=&quot;post&quot; id=&quot;form-add-user&quot;&gt;
</del><ins>+&lt;div class=&quot;wrap&quot; id=&quot;form-add-user&quot;&gt;
+        &lt;h3&gt;&lt;?php _e( 'Add User' ) ?&gt;&lt;/h3&gt;
+        &lt;form action=&quot;ms-edit.php?action=adduser&quot; method=&quot;post&quot;&gt;
</ins><span class="cx">         &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">                 &lt;tr class=&quot;form-field form-required&quot;&gt;
</span><span class="cx">                         &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Username' ) ?&gt;&lt;/th&gt;
</span></span></pre>
</div>
</div>

</body>
</html>