Store subdomain/subdirectory choice in sitemeta. For now, only used in case we return to network.php without constants. see #11816
git-svn-id: http://svn.automattic.com/wordpress/trunk@13642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
df48ab984f
commit
0069db858c
|
@ -702,7 +702,8 @@ Thanks!
|
|||
// @todo - network admins should have a method of editing the network siteurl (used for cookie hash)
|
||||
'siteurl' => get_option( 'siteurl' ),
|
||||
'add_new_users' => '0',
|
||||
'upload_space_check_disabled' => '0'
|
||||
'upload_space_check_disabled' => '0',
|
||||
'subdomain_install' => intval( $subdomain_install ),
|
||||
);
|
||||
|
||||
$insert = '';
|
||||
|
|
|
@ -168,24 +168,30 @@ function network_step1() {
|
|||
*/
|
||||
function network_step2() {
|
||||
global $base, $wpdb;
|
||||
$hostname = get_clean_basedomain();
|
||||
if ( $_POST ) {
|
||||
$vhost = (bool) $_POST['subdomain_install'];
|
||||
$vhost = 'localhost' == $hostname ? false : (bool) $_POST['subdomain_install'];
|
||||
} else {
|
||||
if ( is_multisite() ) {
|
||||
$vhost = is_subdomain_install();
|
||||
?>
|
||||
<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 {
|
||||
$vhost = false; // @todo.
|
||||
$vhost = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
|
||||
?>
|
||||
<div class="error"><p><strong><?php _e('Warning:'); ?></strong> <?php _e( 'An existing WordPress network was detected.' ); ?></p></div>
|
||||
<p><?php _e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if ( $_POST || ! is_multisite() ) {
|
||||
?>
|
||||
<h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
|
||||
<p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
|
||||
<div class="updated inline"><p><?php _e( '<strong>Caution:</strong> We recommend you backup your existing <code>wp-config.php</code> and <code>.htaccess</code> files.' ); ?></p></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<ol>
|
||||
<li><p><?php printf( __( 'Create a <code>blogs.dir</code> directory in <code>%s</code>. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.' ), WP_CONTENT_DIR ); ?></p></li>
|
||||
|
@ -194,7 +200,7 @@ function network_step2() {
|
|||
define( 'MULTISITE', true );
|
||||
define( 'VHOST', '<?php echo $vhost ? 'yes' : 'no'; ?>' );
|
||||
$base = '<?php echo $base; ?>';
|
||||
define( 'DOMAIN_CURRENT_SITE', '<?php echo get_clean_basedomain(); ?>' );
|
||||
define( 'DOMAIN_CURRENT_SITE', '<?php echo $hostname; ?>' );
|
||||
define( 'PATH_CURRENT_SITE', '<?php echo $base; ?>' );
|
||||
define( 'SITE_ID_CURRENT_SITE', 1 );
|
||||
define( 'BLOG_ID_CURRENT_SITE', 1 );</textarea>
|
||||
|
|
Loading…
Reference in New Issue