Changes in trunk/wp-includes/functions.php [15197:14854]
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15197 r14854 1286 1286 fwrite( $out_fp, $response['body']); 1287 1287 fclose($out_fp); 1288 clearstatcache();1289 1288 1290 1289 return $headers; … … 2126 2125 $upload_path = get_option( 'upload_path' ); 2127 2126 $upload_path = trim($upload_path); 2128 $main_override = defined( 'MULTISITE' ) && is_main_site();2127 $main_override = false; 2129 2128 if ( empty($upload_path) ) { 2130 2129 $dir = WP_CONTENT_DIR . '/uploads'; … … 2133 2132 if ( 'wp-content/uploads' == $upload_path ) { 2134 2133 $dir = WP_CONTENT_DIR . '/uploads'; 2134 $main_override = defined( 'MULTISITE' ) && is_main_site(); 2135 2135 } elseif ( 0 !== strpos($dir, ABSPATH) ) { 2136 2136 // $dir is absolute, $upload_path is (maybe) relative to ABSPATH … … 2146 2146 } 2147 2147 2148 if ( defined('UPLOADS') && !$main_override&& ( !isset( $switched ) || $switched === false ) ) {2148 if ( defined('UPLOADS') && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 2149 2149 $dir = ABSPATH . UPLOADS; 2150 2150 $url = trailingslashit( $siteurl ) . UPLOADS; 2151 2151 } 2152 2152 2153 if ( is_multisite() && !$main_override&& ( !isset( $switched ) || $switched === false ) ) {2153 if ( is_multisite() && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 2154 2154 if ( defined( 'BLOGUPLOADDIR' ) ) 2155 2155 $dir = untrailingslashit(BLOGUPLOADDIR); … … 2305 2305 @fwrite( $ifp, $bits ); 2306 2306 fclose( $ifp ); 2307 clearstatcache();2308 2309 2307 // Set correct file permissions 2310 2308 $stat = @ stat( dirname( $new_file ) ); … … 2312 2310 $perms = $perms & 0000666; 2313 2311 @ chmod( $new_file, $perms ); 2314 clearstatcache();2315 2312 2316 2313 // Compute the URL
Note: See TracChangeset
for help on using the changeset viewer.