<!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>[16453] trunk/wp-admin: Move the network version of Tools >
Network to the network admin.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16453">16453</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-11-18 05:24:13 +0000 (Thu, 18 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move the network version of Tools > Network to the network admin. props wpdavis, fixes <a href="http://trac.wordpress.org/ticket/15461">#15461</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminmenuphp">trunk/wp-admin/menu.php</a></li>
<li><a href="#trunkwpadminnetworkmenuphp">trunk/wp-admin/network/menu.php</a></li>
<li><a href="#trunkwpadminnetworkphp">trunk/wp-admin/network.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpadminnetworksetupphp">trunk/wp-admin/network/setup.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu.php (16452 => 16453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu.php        2010-11-18 05:16:43 UTC (rev 16452)
+++ trunk/wp-admin/menu.php        2010-11-18 05:24:13 UTC (rev 16453)
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">         $submenu['tools.php'][15] = array( __('Export'), 'import', 'export.php' );
</span><span class="cx">         if ( is_multisite() && !is_main_site() )
</span><span class="cx">                 $submenu['tools.php'][25] = array( __('Delete Site'), 'manage_options', 'ms-delete-site.php' );
</span><del>-        if ( ( ! is_multisite() || defined( 'MULTISITE' ) ) && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() )
</del><ins>+        if ( ! is_multisite() && defined('WP_ALLOW_MULTISITE') && WP_ALLOW_MULTISITE && is_super_admin() )
</ins><span class="cx">                 $submenu['tools.php'][50] = array(__('Network'), 'manage_options', 'network.php');
</span><span class="cx">
</span><span class="cx"> $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div' );
</span></span></pre></div>
<a id="trunkwpadminnetworkmenuphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network/menu.php (16452 => 16453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/menu.php        2010-11-18 05:16:43 UTC (rev 16452)
+++ trunk/wp-admin/network/menu.php        2010-11-18 05:24:13 UTC (rev 16453)
</span><span class="lines">@@ -37,6 +37,10 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> $menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div');
</span><ins>+if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) {
+        $submenu['settings.php'][5] = array( __('Settings'), 'manage_network_options', 'settings.php' );
+        $submenu['settings.php'][10] = array( __('Network Setup'), 'manage_network_options', 'setup.php' );
+}
</ins><span class="cx">
</span><span class="cx"> $update_themes = get_site_transient( 'update_themes' );
</span><span class="cx"> if ( !empty($update_themes->response) )
</span></span></pre></div>
<a id="trunkwpadminnetworksetupphp"></a>
<div class="addfile"><h4>Added: trunk/wp-admin/network/setup.php (0 => 16453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network/setup.php         (rev 0)
+++ trunk/wp-admin/network/setup.php        2010-11-18 05:24:13 UTC (rev 16453)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+<?php
+/**
+ * Network Setup administration panel.
+ *
+ * @package WordPress
+ * @subpackage Multisite
+ * @since 3.1.0
+ */
+
+/** Load WordPress Administration Bootstrap */
+require_once( './admin.php' );
+
+if ( ! is_multisite() )
+        wp_die( __( 'Multisite support is not enabled.' ) );
+
+require( '../network.php' );
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminnetworkphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/network.php (16452 => 16453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/network.php        2010-11-18 05:16:43 UTC (rev 16452)
+++ trunk/wp-admin/network.php        2010-11-18 05:24:13 UTC (rev 16453)
</span><span class="lines">@@ -89,8 +89,13 @@
</span><span class="cx"> if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALLOW_MULTISITE ) )
</span><span class="cx">         wp_die( __( 'You must define the <code>WP_ALLOW_MULTISITE</code> constant as true in your wp-config.php file to allow creation of a Network.' ) );
</span><span class="cx">
</span><del>-$title = __( 'Create a Network of WordPress Sites' );
-$parent_file = 'tools.php';
</del><ins>+if ( is_network_admin() ) {
+        $title = __( 'Network Setup' );
+        $parent_file = 'settings.php';
+} else {
+        $title = __( 'Create a Network of WordPress Sites' );
+        $parent_file = 'tools.php';
+}
</ins><span class="cx">
</span><span class="cx"> add_contextual_help($current_screen,
</span><span class="cx">         '<p>' . __('This screen allows you to configure a network as having subdomains (<code>site1.example.com</code>) or subdirectories (<code>example.com/site1</code>). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '</p>' .
</span><span class="lines">@@ -105,10 +110,10 @@
</span><span class="cx">         '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
</span><span class="cx"> );
</span><span class="cx">
</span><del>-include( './admin-header.php' );
</del><ins>+include( ABSPATH . 'wp-admin/admin-header.php' );
</ins><span class="cx"> ?>
</span><span class="cx"> <div class="wrap">
</span><del>-<?php screen_icon(); ?>
</del><ins>+<?php screen_icon('tools'); ?>
</ins><span class="cx"> <h2><?php echo esc_html( $title ); ?></h2>
</span><span class="cx">
</span><span class="cx"> <?php
</span><span class="lines">@@ -306,8 +311,9 @@
</span><span class="cx">                 if ( is_multisite() ) {
</span><span class="cx">                         $subdomain_install = is_subdomain_install();
</span><span class="cx"> ?>
</span><del>-        <div class="updated"><p><strong><?php _e( 'Notice: The Network feature is already enabled.' ); ?></strong> <?php _e( 'The original configuration steps are shown here for reference.' ); ?></p></div>
-<?php        } else {
</del><ins>+        <p><?php _e( 'The original configuration steps are shown here for reference.' ); ?></p>
+<?php
+                } else {
</ins><span class="cx">                         $subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
</span><span class="cx"> ?>
</span><span class="cx">         <div class="error"><p><strong><?php _e('Warning:'); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>
</span><span class="lines">@@ -527,4 +533,4 @@
</span><span class="cx"> ?>
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<?php include( './admin-footer.php' ); ?>
</del><ins>+<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
</ins></span></pre>
</div>
</div>
</body>
</html>