Make WordPress Core

Changeset 22038


Ignore:
Timestamp:
09/27/2012 04:56:58 AM (12 years ago)
Author:
nacin
Message:

If a pre-3.0 (MU era) network disables ms-files manually, they don't need /sites/ in their wp-content/uploads directory. see #19235.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r22009 r22038  
    14971497    }
    14981498
    1499     // Multisite (if not the main site in a post-MU network)
     1499    // If multisite (if not the main site in a post-MU network)
    15001500    if ( is_multisite() && ! ( is_main_site() && defined( 'MULTISITE' ) ) ) {
     1501
    15011502        if ( ! get_site_option( 'ms_files_rewriting' ) ) {
    1502             // Append sites/%d if we're not on the main site (for post-MU networks).
    1503             $ms_dir = '/sites/' . get_current_blog_id();
     1503            // Append sites/%d if we're not on the main site (for post-MU networks). The extra directory
     1504            // prevents a four-digit ID from conflict with a year-based directory for the main site.
     1505            // If a MU-era network disables ms-files rewriting manually, they don't need the extra
     1506            // directory, as they never had wp-content/uploads for the main site.
     1507
     1508            if ( defined( 'MULTISITE' ) )
     1509                $ms_dir = '/sites/' . get_current_blog_id();
     1510            else
     1511                $ms_dir = '/' . get_current_blog_id();
     1512
    15041513            $dir .= $ms_dir;
    15051514            $url .= $ms_dir;
Note: See TracChangeset for help on using the changeset viewer.