Changeset 12924
- Timestamp:
- 02/02/2010 02:17:33 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/blogs.php
r12859 r12924 1 1 <?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 2 if ( !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 } 4 6 5 7 if ( $current_blog->archived == '1' || $current_blog->spam == '1' || $current_blog->deleted == '1' ) { … … 65 67 endif; 66 68 67 68 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] ); 69 if ( defined( 'MEDIA_FILE' ) ) 70 $file = BLOGUPLOADDIR . str_replace( '..', '', MEDIA_FILE ); 71 else 72 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] ); 69 73 if ( !is_file( $file ) ) { 70 74 status_header( 404 ); -
trunk/wp-settings.php
r12921 r12924 83 83 include_once( ABSPATH . WPINC . '/pomo/mo.php' ); 84 84 85 // internalize virtual content rewrite rule 86 if ( is_multisite() && !defined( 'SHORTINIT' ) ) { 87 $media_base = $path . 'files/'; 88 $base_len = strlen( $media_base ); 89 if ( substr( $_SERVER[ 'REQUEST_URI' ], 0, $media_len ) == $media_base && $media_len < strlen( $_SERVER[ 'REQUEST_URI' ] ) ) { 90 define( 'MEDIA_FILE', substr( $_SERVER[ 'REQUEST_URI' ], $media_len ) ); 91 require_once( WP_CONTENT_DIR . '/blogs.php' ); 92 exit(); 93 } 94 unset( $media_base, $media_len ); 95 } 85 96 // Stop most of WordPress from being loaded if we just want the basics. 86 97 if ( SHORTINIT )
Note: See TracChangeset
for help on using the changeset viewer.