[buddypress-trac] [BuddyPress] #2317: Upload Path for Avatars is wrong for Multisite

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sun Apr 18 22:26:23 UTC 2010


#2317: Upload Path for Avatars is wrong for Multisite
---------------------+------------------------------------------------------
 Reporter:  ipstenu  |       Owner:     
     Type:  defect   |      Status:  new
 Priority:  normal   |   Milestone:  1.3
Component:  Core     |    Keywords:     
---------------------+------------------------------------------------------
 I don't know if this is a WP 3.0 issue or not, but it has an easy fix.

 When I tried to upload group avatars, it was trying to put the images in
 {{{
 /group-avatars/1/
 }}}

 It looks like this function isn't working right from bp-core-avatars.php


 {{{
 function bp_core_avatar_upload_path() {
         if ( bp_core_is_multisite() )
                 $path = ABSPATH . get_blog_option( BP_ROOT_BLOG,
 'upload_path' );
         else {
                 if ( !$path = get_option( 'upload_path' ) )
                         $path = WP_CONTENT_DIR . '/uploads';
         }

         return apply_filters( 'bp_core_avatar_upload_path', $path );
 }
 }}}


 Calling upload_path is wrong. It should be upload_url_path

 Once I changed it, it worked like a charm.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2317>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list