WordPress.org

Make WordPress Core

Changeset 14680


Ignore:
Timestamp:
05/15/10 21:53:18 (5 years ago)
Author:
wpmuguru
Message:

don't check upload_path in upgraded MU install, see #12549

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r14649 r14680  
    21182118    $upload_path = get_option( 'upload_path' ); 
    21192119    $upload_path = trim($upload_path); 
     2120    $main_override = false; 
    21202121    if ( empty($upload_path) ) { 
    21212122        $dir = WP_CONTENT_DIR . '/uploads'; 
     
    21242125        if ( 'wp-content/uploads' == $upload_path ) { 
    21252126            $dir = WP_CONTENT_DIR . '/uploads'; 
     2127            $main_override = defined( 'MULTISITE' ) && is_main_site(); 
    21262128        } elseif ( 0 !== strpos($dir, ABSPATH) ) { 
    21272129            // $dir is absolute, $upload_path is (maybe) relative to ABSPATH 
     
    21372139    } 
    21382140 
    2139     if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 
     2141    if ( defined('UPLOADS') && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 
    21402142        $dir = ABSPATH . UPLOADS; 
    21412143        $url = trailingslashit( $siteurl ) . UPLOADS; 
    21422144    } 
    21432145 
    2144     if ( is_multisite() && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 
     2146    if ( is_multisite() && ( !$main_override || WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) && ( !isset( $switched ) || $switched === false ) ) { 
    21452147        if ( defined( 'BLOGUPLOADDIR' ) ) 
    21462148            $dir = untrailingslashit(BLOGUPLOADDIR); 
Note: See TracChangeset for help on using the changeset viewer.