Make WordPress Core


Ignore:
Timestamp:
09/11/2012 10:22:20 PM (12 years ago)
Author:
nacin
Message:

Remove ms-files.php rewriting from WordPress multisite. fixes #19235.

Keep existing networks compatible with a ms_files_rewriting network option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-default-constants.php

    r19712 r21823  
    1111 * Defines Multisite upload constants.
    1212 *
     13 * Exists for backward compatibility with legacy file-serving through
     14 * wp-includes/ms-files.php (wp-content/blogs.php in MU).
     15 *
    1316 * @since 3.0.0
    1417 */
    15 function ms_upload_constants(  ) {
     18function ms_upload_constants() {
    1619    global $wpdb;
     20
     21    if ( ! get_site_option( 'ms_files_rewriting' ) )
     22        return;
    1723
    1824    /** @since 3.0.0 */
     
    2531        // Uploads dir relative to ABSPATH
    2632        define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
    27         if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR )
     33        if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) )
    2834            define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );
    2935    }
     
    7581 * Defines Multisite file constants.
    7682 *
     83 * Exists for backward compatibility with legacy file-serving through
     84 * wp-includes/ms-files.php (wp-content/blogs.php in MU).
     85 *
    7786 * @since 3.0.0
    7887 */
    79 function ms_file_constants(  ) {
     88function ms_file_constants() {
    8089    /**
    8190     * Optional support for X-Sendfile header
Note: See TracChangeset for help on using the changeset viewer.