Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/23/2011 09:44:54 PM (9 years ago)
Author:
djpaul
Message:

Fix URL to uploaded avatars on non-BP_ROOT_BLOG sites. Fixes #2451, #2574 and #2968. (branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-avatars.php

    r3669 r3851  
    568568    // If multisite, and current blog does not match root blog, make adjustments
    569569    if ( bp_core_is_multisite() && BP_ROOT_BLOG != $current_blog->blog_id )
    570         $upload_dir['baseurl'] = str_replace( get_blog_option( $current_blog->blog_id, 'home' ) , get_blog_option( BP_ROOT_BLOG, 'home' ), $upload_dir['baseurl'] );
     570        $upload_dir['baseurl'] = trailingslashit( get_blog_option( BP_ROOT_BLOG, 'home' ) ) . get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    571571
    572572    return apply_filters( 'bp_core_avatar_url', $upload_dir['baseurl'] );
Note: See TracChangeset for help on using the changeset viewer.