diff --git a/wp-admin/includes/ms-deprecated.php b/wp-admin/includes/ms-deprecated.php
index 7119018b1f..702e3e13cf 100644
--- a/wp-admin/includes/ms-deprecated.php
+++ b/wp-admin/includes/ms-deprecated.php
@@ -73,4 +73,6 @@ function get_site_allowed_themes() {
function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
_deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_site()' );
return array_map( 'intval', WP_Theme::get_allowed_on_site( $blog_id ) );
-}
\ No newline at end of file
+}
+
+function ms_deprecated_blogs_file() {}
\ No newline at end of file
diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php
index c7d5faeb52..e407010ada 100644
--- a/wp-admin/includes/ms.php
+++ b/wp-admin/includes/ms.php
@@ -90,7 +90,8 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
$wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
- $dir = apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . "/blogs.dir/{$blog_id}/files/", $blog_id );
+ $uploads = wp_upload_dir();
+ $dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id );
$dir = rtrim( $dir, DIRECTORY_SEPARATOR );
$top_dir = $dir;
$stack = array($dir);
@@ -357,8 +358,10 @@ function upload_is_user_over_quota( $echo = true ) {
function get_space_used() {
// Allow for an alternative way of tracking storage space used
$space_used = apply_filters( 'pre_get_space_used', false );
- if ( false === $space_used )
- $space_used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
+ if ( false === $space_used ) {
+ $upload_dir = wp_upload_dir();
+ $space_used = get_dirsize( $upload_dir['basedir'] ) / 1024 / 1024;
+ }
return $space_used;
}
@@ -682,15 +685,6 @@ function choose_primary_blog() {
' . sprintf( __( 'The %1$s file is deprecated. Please remove it and update your server rewrite rules to use %2$s instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '';
-}
-add_action( 'network_admin_notices', 'ms_deprecated_blogs_file' );
-
/**
* Grants super admin privileges.
*
diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php
index 4926ed302b..0b9e6a4dcf 100644
--- a/wp-admin/includes/schema.php
+++ b/wp-admin/includes/schema.php
@@ -912,6 +912,7 @@ We hope you enjoy your new site. Thanks!
'upload_space_check_disabled' => '0',
'subdomain_install' => intval( $subdomain_install ),
'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
+ 'ms_files_rewriting' => is_multisite() ? get_site_option( 'ms_files_rewriting' ) : '0',
'initial_db_version' => get_option( 'initial_db_version' ),
'active_sitewide_plugins' => array(),
);
@@ -940,11 +941,6 @@ We hope you enjoy your new site. Thanks!
$blog_id = $wpdb->insert_id;
update_user_meta( $site_user->ID, 'source_domain', $domain );
update_user_meta( $site_user->ID, 'primary_blog', $blog_id );
- if ( !$upload_path = get_option( 'upload_path' ) ) {
- $upload_path = substr( WP_CONTENT_DIR, strlen( ABSPATH ) ) . '/uploads';
- update_option( 'upload_path', $upload_path );
- }
- update_option( 'fileupload_url', get_option( 'siteurl' ) . '/' . $upload_path );
}
if ( $subdomain_install )
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index 2369cd96b8..4b85017bfa 100644
--- a/wp-admin/includes/upgrade.php
+++ b/wp-admin/includes/upgrade.php
@@ -1271,6 +1271,10 @@ function upgrade_network() {
delete_site_option( 'allowed_themes' );
}
}
+
+ // 3.5
+ if ( $wp_current_db_version < 21823 )
+ update_site_option( 'ms_files_rewriting', '1' );
}
// The functions we use to actually do stuff
diff --git a/wp-admin/network.php b/wp-admin/network.php
index 2931cbbc82..af70da2704 100644
--- a/wp-admin/network.php
+++ b/wp-admin/network.php
@@ -106,7 +106,7 @@ if ( is_network_admin() ) {
$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 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).') . '
' . __('Add the designated lines of code to wp-config.php (just before /*...stop editing...*/) and .htaccess (replacing the existing WordPress rules).') . '
' . __('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:') . '
' . @@ -190,9 +190,6 @@ function network_step1( $errors = false ) { $error_codes = $errors->get_error_codes(); } - if ( WP_CONTENT_DIR != ABSPATH . 'wp-content' ) - echo '' . __('Warning!') . ' ' . __( 'Networks may not be fully compatible with custom wp-content directories.' ) . '
' . __('Warning!') . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '
'; + $is_www = ( 0 === strpos( $hostname, 'www.' ) ); if ( $is_www ) : ?> @@ -360,11 +360,6 @@ 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.' ) . '';
- ?>
wp-config.php file in %s above the line reading /* That’s all, stop editing! Happy blogging. */:' ), ABSPATH ); ?>
web.config file in %s, replacing other WordPress rules:' ), ABSPATH ); ?>
.htaccess file in %s, replacing other WordPress rules:' ), ABSPATH ); ?>
You appear to have already installed WordPress. To reinstall please clear your old database tables first.
') . '