Changes in trunk/wp-includes/functions.php [14854:15197]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r14854 r15197 1286 1286 fwrite( $out_fp, $response['body']); 1287 1287 fclose($out_fp); 1288 clearstatcache(); 1288 1289 1289 1290 return $headers; … … 2125 2126 $upload_path = get_option( 'upload_path' ); 2126 2127 $upload_path = trim($upload_path); 2127 $main_override = false;2128 $main_override = defined( 'MULTISITE' ) && is_main_site(); 2128 2129 if ( empty($upload_path) ) { 2129 2130 $dir = WP_CONTENT_DIR . '/uploads'; … … 2132 2133 if ( 'wp-content/uploads' == $upload_path ) { 2133 2134 $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 || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path )&& ( !isset( $switched ) || $switched === false ) ) {2148 if ( defined('UPLOADS') && !$main_override && ( !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 || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path )&& ( !isset( $switched ) || $switched === false ) ) {2153 if ( is_multisite() && !$main_override && ( !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 2307 2309 // Set correct file permissions 2308 2310 $stat = @ stat( dirname( $new_file ) ); … … 2310 2312 $perms = $perms & 0000666; 2311 2313 @ chmod( $new_file, $perms ); 2314 clearstatcache(); 2312 2315 2313 2316 // Compute the URL
Note: See TracChangeset
for help on using the changeset viewer.