<!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("<div id='update-nag'>" . __("Hi %s! You're logged in as a site administrator.") . "</div>", $current_user->user_login);
</span><span class="cx">         if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) {
</span><del>-                echo "<div id='update-nag'>" . __( 'Thank you for Upgrading! Please visit the <a href="ms-upgrade-site.php">Upgrade Site</a> page to update all your blogs.' ) . "</div>";
</del><ins>+                echo "<div id='update-nag'>" . __( 'Thank you for Upgrading! Please visit the <a href="ms-upgrade-network.php">Upgrade Network</a> page to update all your blogs.' ) . "</div>";
</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>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</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() && 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 "siteoptions":
</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( __("You probably need to go back to the <a href='ms-options.php'>options page</a>") );
</span><span class="cx">
</span><span class="lines">@@ -137,6 +137,9 @@
</span><span class="cx">         case "addblog":
</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( "Can't create an empty blog." );
</span><span class="cx">                 $blog = $_POST['blog'];
</span><span class="lines">@@ -187,6 +190,9 @@
</span><span class="cx">
</span><span class="cx">         case "updateblog":
</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 <a href="ms-sites.php">sites page</a>') );
</span><span class="cx">
</span><span class="lines">@@ -288,6 +294,9 @@
</span><span class="cx">
</span><span class="cx">         case "deleteblog":
</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' && $id != $current_site->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 "allblogs":
</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 => $val ) {
</span><span class="cx">                         if ( $val != '0' && $val != $current_site->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 "archiveblog":
</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, "archived", '1' );
</span><span class="cx">                 do_action( "archive_blog", $id );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'archive'), $_POST['ref'] ) );
</span><span class="lines">@@ -328,6 +343,9 @@
</span><span class="cx">
</span><span class="cx">         case "unarchiveblog":
</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( "unarchive_blog", $id );
</span><span class="cx">                 update_blog_status( $id, "archived", '0' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'unarchive'), $_POST['ref'] ) );
</span><span class="lines">@@ -336,6 +354,9 @@
</span><span class="cx">
</span><span class="cx">         case "activateblog":
</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, "deleted", '0' );
</span><span class="cx">                 do_action( "activate_blog", $id );
</span><span class="cx">                 wp_redirect( add_query_arg( "updated", array('updated' => 'true', 'action' => 'activate'), $_POST['ref'] ) );
</span><span class="lines">@@ -344,6 +365,9 @@
</span><span class="cx">
</span><span class="cx">         case "deactivateblog":
</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( "deactivate_blog", $id );
</span><span class="cx">                 update_blog_status( $id, "deleted", '1' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'deactivate'), $_POST['ref'] ) );
</span><span class="lines">@@ -352,6 +376,9 @@
</span><span class="cx">
</span><span class="cx">         case "unspamblog":
</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, "spam", '0' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => '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 "spamblog":
</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, "spam", '1' );
</span><span class="cx">                 wp_redirect( add_query_arg( array('updated' => 'true', 'action' => '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 "updatethemes":
</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 "allusers":
</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 '<div class="wrap" style="position:relative;">';
</span><span class="lines">@@ -487,6 +523,8 @@
</span><span class="cx">
</span><span class="cx">         case "adduser":
</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( __( "Cannot create an empty user." ) );
</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>+<?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 '<div class="wrap">';
+screen_icon();
+echo '<h2>'.__('Upgrade Network').'</h2>';
+
+$action = isset($_GET['action']) ? $_GET['action'] : 'show';
+
+switch ( $action ) {
+        case "upgrade":
+                $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
+
+                if ( $n < 5 ) {
+                        global $wp_db_version;
+                        update_site_option( 'wpmu_upgrade_site', $wp_db_version );
+                }
+
+                $blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
+                if ( is_array( $blogs ) ) {
+                        echo "<ul>";
+                        foreach ( (array) $blogs as $details ) {
+                                if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
+                                        $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
+                                        echo "<li>$siteurl</li>";
+                                        $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
+                                        if ( is_wp_error( $response ) )
+                                                wp_die( "<strong>Warning!</strong> Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.<br /> Error message: <em>" . $response->get_error_message() ."</em>" );
+                                        do_action( 'after_mu_upgrade', $response );
+                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
+                                }
+                        }
+                        echo "</ul>";
+                        ?><p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a class="button" href="ms-upgrade-network.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Sites"); ?></a></p>
+                        <script type='text/javascript'>
+                        <!--
+                        function nextpage() {
+                                location.href = "ms-upgrade-network.php?action=upgrade&n=<?php echo ($n + 5) ?>";
+                        }
+                        setTimeout( "nextpage()", 250 );
+                        //-->
+                        </script><?php
+                } else {
+                        echo '<p>'.__('All Done!').'</p>';
+                }
+        break;
+        case 'show':
+        default:
+                ?><p><?php _e("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."); ?></p>
+                <p><a class="button" href="ms-upgrade-network.php?action=upgrade"><?php _e("Upgrade Network"); ?></a></p><?php
+                do_action( 'wpmu_upgrade_page' );
+        break;
+}
+?>
+</div>
+
+<?php include('admin-footer.php'); ?>
</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>-<?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 '<div class="wrap">';
-screen_icon();
-echo '<h2>'.__('Upgrade Site').'</h2>';
-
-$action = isset($_GET['action']) ? $_GET['action'] : 'show';
-
-switch ( $action ) {
-        case "upgrade":
-                $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0;
-
-                if ( $n < 5 ) {
-                        global $wp_db_version;
-                        update_site_option( 'wpmu_upgrade_site', $wp_db_version );
-                }
-
-                $blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
-                if ( is_array( $blogs ) ) {
-                        echo "<ul>";
-                        foreach ( (array) $blogs as $details ) {
-                                if ( $details['spam'] == 0 && $details['deleted'] == 0 && $details['archived'] == 0 ) {
-                                        $siteurl = get_blog_option( $details['blog_id'], 'siteurl' );
-                                        echo "<li>$siteurl</li>";
-                                        $response = wp_remote_get( trailingslashit( $siteurl ) . "wp-admin/upgrade.php?step=1", array( 'timeout' => 120, 'httpversion' => '1.1' ) );
-                                        if ( is_wp_error( $response ) )
-                                                wp_die( "<strong>Warning!</strong> Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.<br /> Error message: <em>" . $response->get_error_message() ."</em>" );
-                                        do_action( 'after_mu_upgrade', $response );
-                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
-                                }
-                        }
-                        echo "</ul>";
-                        ?><p><?php _e("If your browser doesn't start loading the next page automatically click this link:"); ?> <a class="button" href="ms-upgrade-site.php?action=upgrade&amp;n=<?php echo ($n + 5) ?>"><?php _e("Next Blogs"); ?></a></p>
-                        <script type='text/javascript'>
-                        <!--
-                        function nextpage() {
-                                location.href = "ms-upgrade-site.php?action=upgrade&n=<?php echo ($n + 5) ?>";
-                        }
-                        setTimeout( "nextpage()", 250 );
-                        //-->
-                        </script><?php
-                } else {
-                        echo '<p>'.__('All Done!').'</p>';
-                }
-        break;
-        case 'show':
-        default:
-                ?><p><?php _e("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."); ?></p>
-                <p><a class="button" href="ms-upgrade-site.php?action=upgrade"><?php _e("Upgrade Site"); ?></a></p><?php
-                do_action( 'wpmu_upgrade_page' );
-        break;
-}
-?>
-</div>
-
-<?php include('admin-footer.php'); ?>
</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']) && $_GET['updated'] == 'true' ) {
</span></span></pre>
</div>
</div>
</body>
</html>