Changeset 12926
- Timestamp:
- 02/02/2010 04:32:19 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/htaccess.ms
r12884 r12926 5 5 RewriteRule ^(.*/)?files/$ index.php [L] 6 6 RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* 7 RewriteRule ^(.*/)?files/(.*) wp- content/blogs.php?file=$2 [L]7 RewriteRule ^(.*/)?files/(.*) wp-includes/blogs.php?file=$2 [L] 8 8 9 9 # add a trailing slash to /wp-admin -
trunk/wp-content/blogs.php
r12924 r12926 1 1 <?php 2 if ( !defined( ' MEDIA_FILE' ) ) {2 if ( !defined( 'SHORTINIT' ) ) { 3 3 define( 'SHORTINIT', true ); // this prevents most of WP from being loaded 4 4 require_once( dirname( dirname( __FILE__) ) . '/wp-load.php' ); // absolute includes are faster … … 67 67 endif; 68 68 69 if ( defined( 'MEDIA_FILE' ) ) 70 $file = BLOGUPLOADDIR . str_replace( '..', '', MEDIA_FILE ); 71 else 72 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] ); 69 $file = BLOGUPLOADDIR . str_replace( '..', '', $_GET[ 'file' ] ); 73 70 if ( !is_file( $file ) ) { 74 71 status_header( 404 ); -
trunk/wp-settings.php
r12924 r12926 83 83 include_once( ABSPATH . WPINC . '/pomo/mo.php' ); 84 84 85 // internalize virtual content rewrite rule86 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 }96 85 // Stop most of WordPress from being loaded if we just want the basics. 97 86 if ( SHORTINIT )
Note: See TracChangeset
for help on using the changeset viewer.