<!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>[13301] trunk/wp-admin: multisite UX, see #11644,
  add manage_ caps for super_admin, fixes #11803</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13301">13301</a></dd>
<dt>Author</dt> <dd>wpmuguru</dd>
<dt>Date</dt> <dd>2010-02-22 18:41:38 +0000 (Mon, 22 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>multisite UX, see <a href="http://trac.wordpress.org/ticket/11644">#11644</a>, add manage_ caps for super_admin, fixes <a href="http://trac.wordpress.org/ticket/11803">#11803</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminmsadminphp">trunk/wp-admin/ms-admin.php</a></li>
<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="#trunkwpadminmsthemesphp">trunk/wp-admin/ms-themes.php</a></li>
<li><a href="#trunkwpadminmsusersphp">trunk/wp-admin/ms-users.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminmsupgradenetworkphp">trunk/wp-admin/ms-upgrade-network.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminmsupgradesitephp">trunk/wp-admin/ms-upgrade-site.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/includes/ms.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -652,7 +652,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">         printf(&quot;&lt;div id='update-nag'&gt;&quot; . __(&quot;Hi %s! You're logged in as a site administrator.&quot;) . &quot;&lt;/div&gt;&quot;, $current_user-&gt;user_login);
</span><span class="cx">         if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) {
</span><del>-                echo &quot;&lt;div id='update-nag'&gt;&quot; . __( 'Thank you for Upgrading! Please visit the &lt;a href=&quot;ms-upgrade-site.php&quot;&gt;Upgrade Site&lt;/a&gt; page to update all your blogs.' ) . &quot;&lt;/div&gt;&quot;;
</del><ins>+                echo &quot;&lt;div id='update-nag'&gt;&quot; . __( 'Thank you for Upgrading! Please visit the &lt;a href=&quot;ms-upgrade-network.php&quot;&gt;Upgrade Network&lt;/a&gt; page to update all your blogs.' ) . &quot;&lt;/div&gt;&quot;;
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> add_action( 'admin_notices', 'site_admin_notice' );
</span><span class="lines">@@ -766,4 +766,4 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'admin_notices', 'show_post_thumbnail_warning' );
</span><span class="cx"> 
</span><del>-?&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+?&gt;
</ins></span></pre></div>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/menu.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -27,14 +27,14 @@
</span><span class="cx"> 
</span><span class="cx"> if ( is_multisite() &amp;&amp; is_super_admin() ) {
</span><span class="cx">         /* translators: Network menu item */
</span><del>-        $menu[0] = array(__('Network'), 'super_admin', 'ms-admin.php', '', 'menu-top menu-top-first', 'menu-site', 'div');
-        $submenu[ 'ms-admin.php' ][1] = array( __('Admin'), 'super_admin', 'ms-admin.php' );
</del><ins>+        $menu[0] = array(__('Network'), 'manage_network', 'ms-admin.php', '', 'menu-top menu-top-first', 'menu-site', 'div');
+        $submenu[ 'ms-admin.php' ][1] = array( __('Admin'), 'manage_network', 'ms-admin.php' );
</ins><span class="cx">         /* translators: Sites menu item */
</span><del>-        $submenu[ 'ms-admin.php' ][5] = array( __('Sites'), 'super_admin', 'ms-sites.php' );
-        $submenu[ 'ms-admin.php' ][10] = array( __('Users'), 'super_admin', 'ms-users.php' );
-        $submenu[ 'ms-admin.php' ][20] = array( __('Themes'), 'super_admin', 'ms-themes.php' );
-        $submenu[ 'ms-admin.php' ][25] = array( __('Options'), 'super_admin', 'ms-options.php' );
-        $submenu[ 'ms-admin.php' ][30] = array( __('Upgrade'), 'super_admin', 'ms-upgrade-site.php' );
</del><ins>+        $submenu[ 'ms-admin.php' ][5] = array( __('Sites'), 'manage_sites', 'ms-sites.php' );
+        $submenu[ 'ms-admin.php' ][10] = array( __('Users'), 'manage_network_users', 'ms-users.php' );
+        $submenu[ 'ms-admin.php' ][20] = array( __('Themes'), 'manage_network_themes', 'ms-themes.php' );
+        $submenu[ 'ms-admin.php' ][25] = array( __('Options'), 'manage_network_options', 'ms-options.php' );
+        $submenu[ 'ms-admin.php' ][30] = array( __('Upgrade'), 'manage_network', 'ms-upgrade-network.php' );
</ins><span class="cx"> 
</span><span class="cx">         $menu[1] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpadminmsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-admin.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-admin.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-admin.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> 
</span><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
</del><ins>+if ( ! current_user_can( 'manage_network' ) )
</ins><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx"> 
</span><span class="cx"> global $wpdb;
</span></span></pre></div>
<a id="trunkwpadminmseditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-edit.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-edit.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-edit.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -4,9 +4,6 @@
</span><span class="cx"> if ( !is_multisite() )
</span><span class="cx">         wp_die( __('Multisite support is not enabled.') );
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
-        wp_die( __('You do not have permission to access this page.') );
-
</del><span class="cx"> do_action('wpmuadminedit', '');
</span><span class="cx"> 
</span><span class="cx"> if ( isset($_GET[ 'id' ]) )
</span><span class="lines">@@ -20,6 +17,9 @@
</span><span class="cx"> switch ( $_GET['action'] ) {
</span><span class="cx">         case &quot;siteoptions&quot;:
</span><span class="cx">                 check_admin_referer('siteoptions');
</span><ins>+                if ( ! current_user_can( 'manage_network_options' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 if ( empty( $_POST ) )
</span><span class="cx">                         wp_die( __(&quot;You probably need to go back to the &lt;a href='ms-options.php'&gt;options page&lt;/a&gt;&quot;) );
</span><span class="cx"> 
</span><span class="lines">@@ -137,6 +137,9 @@
</span><span class="cx">         case &quot;addblog&quot;:
</span><span class="cx">                 check_admin_referer('add-blog');
</span><span class="cx"> 
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 if ( is_array( $_POST[ 'blog' ] ) == false )
</span><span class="cx">                         wp_die( &quot;Can't create an empty blog.&quot; );
</span><span class="cx">                 $blog = $_POST['blog'];
</span><span class="lines">@@ -187,6 +190,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;updateblog&quot;:
</span><span class="cx">                 check_admin_referer('editblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 if ( empty( $_POST ) )
</span><span class="cx">                         wp_die( __('You probably need to go back to the &lt;a href=&quot;ms-sites.php&quot;&gt;sites page&lt;/a&gt;') );
</span><span class="cx"> 
</span><span class="lines">@@ -288,6 +294,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;deleteblog&quot;:
</span><span class="cx">                 check_admin_referer('deleteblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 if ( $id != '0' &amp;&amp; $id != $current_site-&gt;blog_id )
</span><span class="cx">                         wpmu_delete_blog( $id, true );
</span><span class="cx"> 
</span><span class="lines">@@ -297,6 +306,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;allblogs&quot;:
</span><span class="cx">                 check_admin_referer('allblogs');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 foreach ( (array) $_POST[ 'allblogs' ] as $key =&gt; $val ) {
</span><span class="cx">                         if ( $val != '0' &amp;&amp; $val != $current_site-&gt;blog_id ) {
</span><span class="cx">                                 if ( isset($_POST['allblog_delete']) ) {
</span><span class="lines">@@ -320,6 +332,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;archiveblog&quot;:
</span><span class="cx">                 check_admin_referer('archiveblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 update_blog_status( $id, &quot;archived&quot;, '1' );
</span><span class="cx">                 do_action( &quot;archive_blog&quot;, $id );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' =&gt; 'true', 'action' =&gt; 'archive'), $_POST['ref'] ) );
</span><span class="lines">@@ -328,6 +343,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;unarchiveblog&quot;:
</span><span class="cx">                 check_admin_referer('unarchiveblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 do_action( &quot;unarchive_blog&quot;, $id );
</span><span class="cx">                 update_blog_status( $id, &quot;archived&quot;, '0' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' =&gt; 'true', 'action' =&gt; 'unarchive'), $_POST['ref'] ) );
</span><span class="lines">@@ -336,6 +354,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;activateblog&quot;:
</span><span class="cx">                 check_admin_referer('activateblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 update_blog_status( $id, &quot;deleted&quot;, '0' );
</span><span class="cx">                 do_action( &quot;activate_blog&quot;, $id );
</span><span class="cx">                 wp_redirect( add_query_arg( &quot;updated&quot;, array('updated' =&gt; 'true', 'action' =&gt; 'activate'), $_POST['ref'] ) );
</span><span class="lines">@@ -344,6 +365,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;deactivateblog&quot;:
</span><span class="cx">                 check_admin_referer('deactivateblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 do_action( &quot;deactivate_blog&quot;, $id );
</span><span class="cx">                 update_blog_status( $id, &quot;deleted&quot;, '1' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' =&gt; 'true', 'action' =&gt; 'deactivate'), $_POST['ref'] ) );
</span><span class="lines">@@ -352,6 +376,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;unspamblog&quot;:
</span><span class="cx">                 check_admin_referer('unspamblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 update_blog_status( $id, &quot;spam&quot;, '0' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' =&gt; 'true', 'action' =&gt; 'unspam'), $_POST['ref'] ) );
</span><span class="cx">                 exit();
</span><span class="lines">@@ -359,6 +386,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;spamblog&quot;:
</span><span class="cx">                 check_admin_referer('spamblog');
</span><ins>+                if ( ! current_user_can( 'manage_sites' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 update_blog_status( $id, &quot;spam&quot;, '1' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' =&gt; 'true', 'action' =&gt; 'spam'), $_POST['ref'] ) );
</span><span class="cx">                 exit();
</span><span class="lines">@@ -381,6 +411,9 @@
</span><span class="cx"> 
</span><span class="cx">         // Themes
</span><span class="cx">     case &quot;updatethemes&quot;:
</span><ins>+        if ( ! current_user_can( 'manage_network_themes' ) )
+                wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">             if ( is_array( $_POST['theme'] ) ) {
</span><span class="cx">                         $themes = get_themes();
</span><span class="cx">                         reset( $themes );
</span><span class="lines">@@ -438,6 +471,9 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;allusers&quot;:
</span><span class="cx">                 check_admin_referer('allusers');
</span><ins>+                if ( ! current_user_can( 'manage_network_users' ) )
+                        wp_die( __('You do not have permission to access this page.') );
+
</ins><span class="cx">                 if ( isset($_POST['alluser_delete']) ) {
</span><span class="cx">                         require_once('admin-header.php');
</span><span class="cx">                         echo '&lt;div class=&quot;wrap&quot; style=&quot;position:relative;&quot;&gt;';
</span><span class="lines">@@ -487,6 +523,8 @@
</span><span class="cx"> 
</span><span class="cx">         case &quot;adduser&quot;:
</span><span class="cx">                 check_admin_referer('add-user');
</span><ins>+                if ( ! current_user_can( 'manage_network_users' ) )
+                        wp_die( __('You do not have permission to access this page.') );
</ins><span class="cx"> 
</span><span class="cx">                 if ( is_array( $_POST[ 'user' ] ) == false )
</span><span class="cx">                         wp_die( __( &quot;Cannot create an empty user.&quot; ) );
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-options.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> 
</span><span class="cx"> include('admin-header.php');
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
</del><ins>+if ( ! current_user_can( 'manage_network_options' ) )
</ins><span class="cx">     wp_die( __('You do not have permission to access this page.') );
</span><span class="cx"> 
</span><span class="cx"> if (isset($_GET['updated'])) {
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-sites.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> 
</span><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
</del><ins>+if ( ! current_user_can( 'manage_sites' ) )
</ins><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx"> 
</span><span class="cx"> $id = isset($_GET['id']) ? intval( $_GET['id'] ) : 0;
</span></span></pre></div>
<a id="trunkwpadminmsthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-themes.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-themes.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-themes.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> $parent_file = 'ms-admin.php';
</span><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
</del><ins>+if ( ! current_user_can( 'manage_network_themes' ) )
</ins><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx"> 
</span><span class="cx"> if ( isset($_GET['updated']) ) {
</span></span></pre></div>
<a id="trunkwpadminmsupgradenetworkphpfromrev13292trunkwpadminmsupgradesitephp"></a>
<div class="copfile"><h4>Copied: trunk/wp-admin/ms-upgrade-network.php (from rev 13292, trunk/wp-admin/ms-upgrade-site.php) (0 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-upgrade-network.php                                (rev 0)
+++ trunk/wp-admin/ms-upgrade-network.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+&lt;?php
+require_once('admin.php');
+
+if ( !is_multisite() )
+        wp_die( __('Multisite support is not enabled.') );
+
+require_once( ABSPATH . WPINC . '/http.php' );
+
+$title = __('Upgrade Network');
+$parent_file = 'ms-admin.php';
+require_once('admin-header.php');
+
+if ( ! current_user_can( 'manage_network' ) )
+        wp_die( __('You do not have permission to access this page.') );
+
+echo '&lt;div class=&quot;wrap&quot;&gt;';
+screen_icon();
+echo '&lt;h2&gt;'.__('Upgrade Network').'&lt;/h2&gt;';
+
+$action = isset($_GET['action']) ? $_GET['action'] : 'show';
+
+switch ( $action ) {
+        case &quot;upgrade&quot;:
+                $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
+
+                if ( $n &lt; 5 ) {
+                        global $wp_db_version;
+                        update_site_option( 'wpmu_upgrade_site', $wp_db_version );
+                }
+
+                $blogs = $wpdb-&gt;get_results( &quot;SELECT * FROM {$wpdb-&gt;blogs} WHERE site_id = '{$wpdb-&gt;siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5&quot;, ARRAY_A );
+                if ( is_array( $blogs ) ) {
+                        echo &quot;&lt;ul&gt;&quot;;
+                        foreach ( (array) $blogs as $details ) {
+                                if ( $details['spam'] == 0 &amp;&amp; $details['deleted'] == 0 &amp;&amp; $details['archived'] == 0 ) {
+                                        $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
+                                        echo &quot;&lt;li&gt;$siteurl&lt;/li&gt;&quot;;
+                                        $response = wp_remote_get( trailingslashit( $siteurl ) . &quot;wp-admin/upgrade.php?step=1&quot;, array( 'timeout' =&gt; 120, 'httpversion' =&gt; '1.1' ) );
+                                        if ( is_wp_error( $response ) )
+                                                wp_die( &quot;&lt;strong&gt;Warning!&lt;/strong&gt; Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.&lt;br /&gt; Error message: &lt;em&gt;&quot; . $response-&gt;get_error_message() .&quot;&lt;/em&gt;&quot; );
+                                        do_action( 'after_mu_upgrade', $response );
+                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
+                                }
+                        }
+                        echo &quot;&lt;/ul&gt;&quot;;
+                        ?&gt;&lt;p&gt;&lt;?php _e(&quot;If your browser doesn't start loading the next page automatically click this link:&quot;); ?&gt; &lt;a class=&quot;button&quot; href=&quot;ms-upgrade-network.php?action=upgrade&amp;amp;n=&lt;?php echo ($n + 5) ?&gt;&quot;&gt;&lt;?php _e(&quot;Next Sites&quot;); ?&gt;&lt;/a&gt;&lt;/p&gt;
+                        &lt;script type='text/javascript'&gt;
+                        &lt;!--
+                        function nextpage() {
+                                location.href = &quot;ms-upgrade-network.php?action=upgrade&amp;n=&lt;?php echo ($n + 5) ?&gt;&quot;;
+                        }
+                        setTimeout( &quot;nextpage()&quot;, 250 );
+                        //--&gt;
+                        &lt;/script&gt;&lt;?php
+                } else {
+                        echo '&lt;p&gt;'.__('All Done!').'&lt;/p&gt;';
+                }
+        break;
+        case 'show':
+        default:
+                ?&gt;&lt;p&gt;&lt;?php _e(&quot;You can upgrade all the sites on your network through this page. It works by calling the upgrade script of each site automatically. Hit the link below to upgrade.&quot;); ?&gt;&lt;/p&gt;
+                &lt;p&gt;&lt;a class=&quot;button&quot; href=&quot;ms-upgrade-network.php?action=upgrade&quot;&gt;&lt;?php _e(&quot;Upgrade Network&quot;); ?&gt;&lt;/a&gt;&lt;/p&gt;&lt;?php
+                do_action( 'wpmu_upgrade_page' );
+        break;
+}
+?&gt;
+&lt;/div&gt;
+
+&lt;?php include('admin-footer.php'); ?&gt;
</ins></span></pre></div>
<a id="trunkwpadminmsupgradenetworkphp"></a>
<div class="propset"><h4>Property changes: trunk/wp-admin/ms-upgrade-network.php</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:mergeinfo
</span><span class="cx">   + 
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpadminmsupgradesitephp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/ms-upgrade-site.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-upgrade-site.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-upgrade-site.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-&lt;?php
-require_once('admin.php');
-
-if ( !is_multisite() )
-        wp_die( __('Multisite support is not enabled.') );
-
-require_once( ABSPATH . WPINC . '/http.php' );
-
-$title = __('Upgrade Site');
-$parent_file = 'ms-admin.php';
-require_once('admin-header.php');
-
-if ( !is_super_admin() )
-        wp_die( __('You do not have permission to access this page.') );
-
-echo '&lt;div class=&quot;wrap&quot;&gt;';
-screen_icon();
-echo '&lt;h2&gt;'.__('Upgrade Site').'&lt;/h2&gt;';
-
-$action = isset($_GET['action']) ? $_GET['action'] : 'show';
-
-switch ( $action ) {
-        case &quot;upgrade&quot;:
-                $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
-
-                if ( $n &lt; 5 ) {
-                        global $wp_db_version;
-                        update_site_option( 'wpmu_upgrade_site', $wp_db_version );
-                }
-
-                $blogs = $wpdb-&gt;get_results( &quot;SELECT * FROM {$wpdb-&gt;blogs} WHERE site_id = '{$wpdb-&gt;siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5&quot;, ARRAY_A );
-                if ( is_array( $blogs ) ) {
-                        echo &quot;&lt;ul&gt;&quot;;
-                        foreach ( (array) $blogs as $details ) {
-                                if ( $details['spam'] == 0 &amp;&amp; $details['deleted'] == 0 &amp;&amp; $details['archived'] == 0 ) {
-                                        $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
-                                        echo &quot;&lt;li&gt;$siteurl&lt;/li&gt;&quot;;
-                                        $response = wp_remote_get( trailingslashit( $siteurl ) . &quot;wp-admin/upgrade.php?step=1&quot;, array( 'timeout' =&gt; 120, 'httpversion' =&gt; '1.1' ) );
-                                        if ( is_wp_error( $response ) )
-                                                wp_die( &quot;&lt;strong&gt;Warning!&lt;/strong&gt; Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.&lt;br /&gt; Error message: &lt;em&gt;&quot; . $response-&gt;get_error_message() .&quot;&lt;/em&gt;&quot; );
-                                        do_action( 'after_mu_upgrade', $response );
-                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
-                                }
-                        }
-                        echo &quot;&lt;/ul&gt;&quot;;
-                        ?&gt;&lt;p&gt;&lt;?php _e(&quot;If your browser doesn't start loading the next page automatically click this link:&quot;); ?&gt; &lt;a class=&quot;button&quot; href=&quot;ms-upgrade-site.php?action=upgrade&amp;amp;n=&lt;?php echo ($n + 5) ?&gt;&quot;&gt;&lt;?php _e(&quot;Next Blogs&quot;); ?&gt;&lt;/a&gt;&lt;/p&gt;
-                        &lt;script type='text/javascript'&gt;
-                        &lt;!--
-                        function nextpage() {
-                                location.href = &quot;ms-upgrade-site.php?action=upgrade&amp;n=&lt;?php echo ($n + 5) ?&gt;&quot;;
-                        }
-                        setTimeout( &quot;nextpage()&quot;, 250 );
-                        //--&gt;
-                        &lt;/script&gt;&lt;?php
-                } else {
-                        echo '&lt;p&gt;'.__('All Done!').'&lt;/p&gt;';
-                }
-        break;
-        case 'show':
-        default:
-                ?&gt;&lt;p&gt;&lt;?php _e(&quot;You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blog automatically. Hit the link below to upgrade.&quot;); ?&gt;&lt;/p&gt;
-                &lt;p&gt;&lt;a class=&quot;button&quot; href=&quot;ms-upgrade-site.php?action=upgrade&quot;&gt;&lt;?php _e(&quot;Upgrade Site&quot;); ?&gt;&lt;/a&gt;&lt;/p&gt;&lt;?php
-                do_action( 'wpmu_upgrade_page' );
-        break;
-}
-?&gt;
-&lt;/div&gt;
-
-&lt;?php include('admin-footer.php'); ?&gt;
</del></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (13300 => 13301)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-02-22 18:35:35 UTC (rev 13300)
+++ trunk/wp-admin/ms-users.php        2010-02-22 18:41:38 UTC (rev 13301)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> 
</span><span class="cx"> require_once('admin-header.php');
</span><span class="cx"> 
</span><del>-if ( !is_super_admin() )
</del><ins>+if ( ! current_user_can( 'manage_network_users' ) )
</ins><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx"> 
</span><span class="cx"> if ( isset($_GET['updated']) &amp;&amp; $_GET['updated'] == 'true' ) {
</span></span></pre>
</div>
</div>

</body>
</html>