Ticket #12496: 12496.diff
| File 12496.diff, 3.2 KB (added by , 17 years ago) |
|---|
-
wp-includes/ms-default-constants.php
18 18 if ( !defined( 'UPLOADBLOGSDIR' ) ) 19 19 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 20 20 21 $bloginfo = get_blog_details( $wpdb->blogid, false ); 22 $file_path = rtrim($bloginfo->domain . $bloginfo->path, '/'); 23 21 24 /** @since 3.0.0 */ 22 25 if ( !defined( 'UPLOADS' ) ) 23 define( 'UPLOADS', UPLOADBLOGSDIR . "/ {$wpdb->blogid}/files/" );26 define( 'UPLOADS', UPLOADBLOGSDIR . "/$file_path/files/" ); 24 27 25 28 /** @since 3.0.0 */ 26 29 if ( !defined( 'BLOGUPLOADDIR' ) ) 27 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/ {$wpdb->blogid}/files/" );30 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . "/blogs.dir/$file_path/files/" ); 28 31 } 29 32 30 33 /** -
wp-includes/ms-functions.php
926 926 $wpdb->suppress_errors(false); 927 927 928 928 $url = get_blogaddress_by_id($blog_id); 929 929 $bloginfo = get_blog_details( $blog_id, false ); 930 $file_path = rtrim($bloginfo->domain . $bloginfo->path, '/'); 931 930 932 // Set everything up 931 933 make_db_current_silent(); 932 934 populate_options(); … … 937 939 update_option('siteurl', $url); 938 940 update_option('home', $url); 939 941 update_option('fileupload_url', $url . "files" ); 940 update_option('upload_path', "wp-content/blogs.dir/" . $ blog_id. "/files");942 update_option('upload_path', "wp-content/blogs.dir/" . $file_path . "/files"); 941 943 update_option('blogname', stripslashes( $blog_title ) ); 942 944 update_option('admin_email', ''); 943 945 $wpdb->update( $wpdb->options, array('option_value' => ''), array('option_name' => 'admin_email') ); -
wp-admin/includes/htaccess.ms
2 2 RewriteBase BASE/ 3 3 4 4 #uploaded files 5 RewriteRule ^(.*/)?files/$ index.php [L] 6 RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* 7 RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L] 5 RewriteCond %{REQUEST_URI} !\bwp-content/ 6 RewriteRule (^|/)files/ wp-content/blogs.dir/%{HTTP_HOST}%{REQUEST_URI} [L] 8 7 9 8 # add a trailing slash to /wp-admin 10 9 RewriteCond %{REQUEST_URI} ^.*/wp-admin$ -
wp-admin/includes/ms.php
76 76 $wpdb->query( "DROP TABLE IF EXISTS ". current( $drop_table ) ."" ); 77 77 } 78 78 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->blogs WHERE blog_id = %d", $blog_id) ); 79 $dir = apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . "/blogs.dir/{$blog_id}/files/", $blog_id ); 79 80 $bloginfo = get_blog_details( $blog_id, false ); 81 $file_path = rtrim($bloginfo->domain . $bloginfo->path, '/'); 82 83 $dir = apply_filters( 'wpmu_delete_blog_upload_dir', WP_CONTENT_DIR . "/blogs.dir/$file_path/files/", $blog_id ); 80 84 $dir = rtrim($dir, DIRECTORY_SEPARATOR); 81 85 $top_dir = $dir; 82 86 $stack = array($dir);
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)