Make WordPress Core

Changeset 13619


Ignore:
Timestamp:
03/08/2010 07:52:29 PM (16 years ago)
Author:
wpmuguru
Message:

allow existing media path on main site when converting to multisite, see #12549

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r13595 r13619  
    727727        update_user_meta( $site_user->ID, 'source_domain', $domain );
    728728        update_user_meta( $site_user->ID, 'primary_blog', $blog_id );
     729        if ( !$upload_path = get_option( 'upload_path' ) ) {
     730            $upload_path = substr( WP_CONTENT_DIR, strlen( ABSPATH ) ) . '/uploads';
     731            update_option( 'upload_path', $upload_path );
     732        }
    729733    }
    730734
  • trunk/wp-includes/functions.php

    r13616 r13619  
    21322132    }
    21332133
    2134     if ( defined('UPLOADS') ) {
     2134    if ( defined('UPLOADS') && ( WP_CONTENT_DIR . '/uploads' != ABSPATH . $upload_path ) ) {
    21352135        $dir = ABSPATH . UPLOADS;
    21362136        $url = trailingslashit( $siteurl ) . UPLOADS;
Note: See TracChangeset for help on using the changeset viewer.