From 92c2b40e0b192463041461cfccd0ef76bfda0711 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 1 Dec 2010 21:32:40 +0000 Subject: [PATCH] Network setup fixes. Props wpdavis. fixes #15620 git-svn-id: http://svn.automattic.com/wordpress/trunk@16672 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-admin/network.php b/wp-admin/network.php index 2468f7d91..01006442d 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -137,14 +137,14 @@ function network_step1( $errors = false ) { 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 ''; - include ('./admin-footer.php' ); + 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 ''; - include ('./admin-footer.php' ); + include ( ABSPATH . 'wp-admin/admin-footer.php' ); die(); } @@ -152,7 +152,7 @@ function network_step1( $errors = false ) { if ( ! empty( $active_plugins ) ) { echo '

' . __('Warning:') . ' ' . sprintf( __( 'Please deactivate your plugins before enabling the Network feature.' ), admin_url( 'plugins.php?plugin_status=active' ) ) . '

' . __( 'Once the network is created, you may reactivate your plugins.' ) . '

'; echo ''; - include( './admin-footer.php' ); + include( ABSPATH . 'wp-admin/admin-footer.php' ); die(); } @@ -163,7 +163,7 @@ function network_step1( $errors = false ) { echo '

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

'; echo '' . __( 'Return to Dashboard' ) . ''; echo ''; - include( './admin-footer.php' ); + include( ABSPATH . 'wp-admin/admin-footer.php' ); die(); } @@ -511,9 +511,10 @@ RewriteRule ^ - [L]'; } } -$base = trailingslashit( stripslashes( dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ) ); - if ( $_POST ) { + + $base = trailingslashit( stripslashes( dirname( dirname( $_SERVER['SCRIPT_NAME'] ) ) ) ); + check_admin_referer( 'install-network-1' ); require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );