[buddypress-trac] [BuddyPress] #3405: bp_core_fetch_avatar() not getting most recently uploaded avatar

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Jul 28 20:59:56 UTC 2011


#3405: bp_core_fetch_avatar() not getting most recently uploaded avatar
--------------------+-----------------------------
 Reporter:  KChun   |      Owner:
     Type:  defect  |     Status:  new
 Priority:  normal  |  Milestone:  Awaiting Review
Component:  Core    |    Version:
 Severity:  minor   |   Keywords:
--------------------+-----------------------------
 Version 1.2.9

 in bp-core-avatars.php line 163, rewrite code to choose the most recent
 file time if there are more than 1 set of avatars.

                         // Check for array
                         if ( 0 < count( $avatar_files ) ) {
                                 '''$avatar_file_time=0; '''
 '''$avatar_home_path=str_replace($bp->root_domain,ABSPATH,$avatar_folder_url);'''

                                 // Check for current avatar
                                 foreach( $avatar_files as $key => $value )
 '''{'''
                                         if ( strpos ( $value, $avatar_size
 )!== false )  '''{'''
                                                 '''if($avatar_file_time <
 ($t=filemtime($avatar_home_path . '/' . $value))) {'''
 '''$avatar_file_time=$t;'''
                                                         $avatar_url =
 $avatar_folder_url . '/' . $avatar_files[$key];
                                                 '''}'''
                                         '''}'''
                                 }

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3405>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list