Make WordPress Core


Ignore:
Timestamp:
02/02/2010 02:17:33 AM (15 years ago)
Author:
wpmuguru
Message:

internalize uploaded media rewrite rule, see #11742

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/blogs.php

    r12859 r12924  
    11<?php
    2 define( 'SHORTINIT', true ); // this prevents most of WP from being loaded
    3 require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' ); // absolute includes are faster
     2if ( !defined( 'MEDIA_FILE' ) ) {
     3    define( 'SHORTINIT', true ); // this prevents most of WP from being loaded
     4    require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' ); // absolute includes are faster
     5}
    46
    57if ( $current_blog->archived == '1' || $current_blog->spam == '1' || $current_blog->deleted == '1' ) {
     
    6567endif;
    6668
    67 
    68 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );
     69if ( defined( 'MEDIA_FILE' ) )
     70    $file = BLOGUPLOADDIR . str_replace( '..', '', MEDIA_FILE );
     71else
     72    $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] );
    6973if ( !is_file( $file ) ) {
    7074    status_header( 404 );
Note: See TracChangeset for help on using the changeset viewer.