WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/11/2012 10:22:20 PM (9 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-admin/includes/ms.php

    r21813 r21823  
    9191        $wpdb->delete( $wpdb->blogs, array( 'blog_id' => $blog_id ) );
    9292
    93         $dir = apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . "/blogs.dir/{$blog_id}/files/", $blog_id );
     93        $uploads = wp_upload_dir();
     94        $dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $blog_id );
    9495        $dir = rtrim( $dir, DIRECTORY_SEPARATOR );
    9596        $top_dir = $dir;
     
    358359    // Allow for an alternative way of tracking storage space used
    359360    $space_used = apply_filters( 'pre_get_space_used', false );
    360     if ( false === $space_used )
    361         $space_used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
     361    if ( false === $space_used ) {
     362        $upload_dir = wp_upload_dir();
     363        $space_used = get_dirsize( $upload_dir['basedir'] ) / 1024 / 1024;
     364    }
    362365
    363366    return $space_used;
     
    683686}
    684687
    685 function ms_deprecated_blogs_file() {
    686     if ( ! is_super_admin() )
    687         return;
    688     if ( ! file_exists( WP_CONTENT_DIR . '/blogs.php' ) )
    689         return;
    690     echo '<div class="update-nag">' . sprintf( __( 'The <code>%1$s</code> file is deprecated. Please remove it and update your server rewrite rules to use <code>%2$s</code> instead.' ), 'wp-content/blogs.php', 'wp-includes/ms-files.php' ) . '</div>';
    691 }
    692 add_action( 'network_admin_notices', 'ms_deprecated_blogs_file' );
    693 
    694688/**
    695689 * Grants super admin privileges.
Note: See TracChangeset for help on using the changeset viewer.