Changeset 41661 for trunk/src/wp-includes/ms-default-constants.php
- Timestamp:
- 10/02/2017 01:43:48 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-default-constants.php
r38814 r41661 15 15 * 16 16 * @since 3.0.0 17 *18 * @global wpdb $wpdb WordPress database abstraction object.19 17 */ 20 18 function ms_upload_constants() { 21 global $wpdb;22 23 19 // This filter is attached in ms-default-filters.php but that file is not included during SHORTINIT. 24 20 add_filter( 'default_site_option_ms_files_rewriting', '__return_true' ); … … 34 30 // This is handled in wp_upload_dir() by ignoring UPLOADS for this case. 35 31 if ( ! defined( 'UPLOADS' ) ) { 36 define( 'UPLOADS', UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" ); 32 $site_id = get_current_blog_id(); 33 34 define( 'UPLOADS', UPLOADBLOGSDIR . '/' . $site_id . '/files/' ); 37 35 38 36 // Uploads dir relative to ABSPATH 39 37 if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) 40 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/");38 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . '/blogs.dir/' . $site_id . '/files/' ); 41 39 } 42 40 }
Note: See TracChangeset
for help on using the changeset viewer.