X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b609ea801799cbbd5f02d95e0dc547ab53a56f4c..refs/tags/wordpress-3.4.1:/wp-admin/network.php diff --git a/wp-admin/network.php b/wp-admin/network.php index 6ff266bd..2931cbbc 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -10,7 +10,7 @@ * @subpackage Administration */ -define( 'WP_NETWORK_ADMIN_PAGE', true ); +define( 'WP_INSTALLING_NETWORK', true ); /** WordPress Administration Bootstrap */ require_once( './admin.php' ); @@ -103,15 +103,26 @@ if ( is_network_admin() ) { $parent_file = 'tools.php'; } -add_contextual_help($current_screen, - '

' . __('This screen allows you to configure a network as having subdomains (site1.example.com) or subdirectories (example.com/site1). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '

' . +$network_help = '

' . __('This screen allows you to configure a network as having subdomains (site1.example.com) or subdirectories (example.com/site1). Subdomains require wildcard subdomains to be enabled in Apache and DNS records, if your host allows it.') . '

' . '

' . __('Choose subdomains or subdirectories; this can only be switched afterwards by reconfiguring your install. Fill out the network details, and click install. If this does not work, you may have to add a wildcard DNS record (for subdomains) or change to another setting in Permalinks (for subdirectories).') . '

' . - '

' . __('The next screen for Network will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.') . '

' . + '

' . __('The next screen for Network Setup will give you individually-generated lines of code to add to your wp-config.php and .htaccess files. Make sure the settings of your FTP client make files starting with a dot visible, so that you can find .htaccess; you may have to create this file if it really is not there. Make backup copies of those two files.') . '

' . '

' . __('Add a blogs.dir directory under /wp-content and add the designated lines of code to wp-config.php (just before /*...stop editing...*/) and .htaccess (replacing the existing WordPress rules).') . '

' . - '

' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed soon in a future version.') . '

' . + '

' . __('Once you add this code and refresh your browser, multisite should be enabled. This screen, now in the Network Admin navigation menu, will keep an archive of the added code. You can toggle between Network Admin and Site Admin by clicking on the Network Admin or an individual site name under the My Sites dropdown in the Toolbar.') . '

' . + '

' . __('The choice of subdirectory sites is disabled if this setup is more than a month old because of permalink problems with “/blog/” from the main site. This disabling will be addressed in a future version.') . '

' . '

' . __('For more information:') . '

' . '

' . __('Documentation on Creating a Network') . '

' . - '

' . __('Documentation on the Network Screen') . '

' . + '

' . __('Documentation on the Network Screen') . '

'; + +get_current_screen()->add_help_tab( array( + 'id' => 'network', + 'title' => __('Network'), + 'content' => $network_help, +) ); + +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . + '

' . __('Documentation on Creating a Network') . '

' . + '

' . __('Documentation on the Network Screen') . '

' . '

' . __('Support Forums') . '

' ); @@ -134,14 +145,14 @@ function network_step1( $errors = false ) { global $is_apache; if ( get_option( 'siteurl' ) != get_option( 'home' ) ) { - echo '

' . __('Error:') . ' ' . sprintf( __( 'Your WordPress address must match your Site address before creating a Network. See General Settings.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '

'; + echo '

' . __('ERROR:') . ' ' . sprintf( __( 'Your WordPress address must match your Site address before creating a Network. See General Settings.' ), esc_url( admin_url( 'options-general.php' ) ) ) . '

'; echo ''; include ( ABSPATH . 'wp-admin/admin-footer.php' ); die(); } if ( defined('DO_NOT_UPGRADE_GLOBAL_TABLES') ) { - echo '

' . __('Error:') . ' ' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.' ) . '

'; + echo '

' . __('ERROR:') . ' ' . __( 'The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.' ) . '

'; echo ''; include ( ABSPATH . 'wp-admin/admin-footer.php' ); die(); @@ -158,7 +169,7 @@ function network_step1( $errors = false ) { $hostname = get_clean_basedomain(); $has_ports = strstr( $hostname, ':' ); if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) { - echo '

' . __( 'Error:') . ' ' . __( 'You cannot install a network of sites with your server address.' ) . '

'; + echo '

' . __( 'ERROR:') . ' ' . __( 'You cannot install a network of sites with your server address.' ) . '

'; echo '

' . sprintf( __( 'You cannot use port numbers such as %s.' ), $has_ports ) . '

'; echo '' . __( 'Return to Dashboard' ) . ''; echo ''; @@ -228,7 +239,7 @@ function network_step1( $errors = false ) { if ( $is_www ) : ?>

-

%1$s before enabling the network feature. It will still be possible to visit your site using the www prefix with an address like %2$s but any links will not have the www prefix.' ), substr( $hostname, 4 ), $hostname ); ?> +

%1$s before enabling the network feature. It will still be possible to visit your site using the www prefix with an address like %2$s but any links will not have the www prefix.' ), substr( $hostname, 4 ), $hostname ); ?>

@@ -352,17 +363,17 @@ function network_step2( $errors = false ) {
  • blogs.dir directory at %s/blogs.dir. This directory is used to store uploaded media for your additional sites and must be writeable by the web server.' ), WP_CONTENT_DIR ); if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' ) - echo ' ' . __('Warning:') . ' ' . __( 'Networks may not be fully compatible with custom wp-content directories.' ) . '' . __('Warning:') . ' ' . __( 'Networks may not be fully compatible with custom wp-content directories.' ) . ''; ?>

  • wp-config.php file in %s above the line reading /* That’s all, stop editing! Happy blogging. */:' ), ABSPATH ); ?>

    +define('DOMAIN_CURRENT_SITE', ''); +define('PATH_CURRENT_SITE', ''); +define('SITE_ID_CURRENT_SITE', 1); +define('BLOG_ID_CURRENT_SITE', 1); '', 'SECURE_AUTH_KEY' => '', 'LOGGED_IN_KEY' => '', 'NONCE_KEY' => '', 'AUTH_SALT' => '', 'SECURE_AUTH_SALT' => '', 'LOGGED_IN_SALT' => '', 'NONCE_SALT' => '' ); foreach ( $keys_salts as $c => $v ) { @@ -454,7 +465,7 @@ define( 'BLOG_ID_CURRENT_SITE', 1 ); - + @@ -522,7 +533,7 @@ if ( $_POST ) { // create network tables install_network(); $hostname = get_clean_basedomain(); - $subdomain_install = !allow_subdomain_install() ? false : (bool) $_POST['subdomain_install']; + $subdomain_install = allow_subdomain_install() ? !empty( $_POST['subdomain_install'] ) : false; if ( ! network_domain_check() ) { $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), stripslashes( $_POST['sitename'] ), $base, $subdomain_install ); if ( is_wp_error( $result ) ) {