Ticket #3087: 3087.02.patch
File 3087.02.patch, 936 bytes (added by , 14 years ago) |
---|
-
bp-core/bp-core-avatars.php
478 478 */ 479 479 function bp_core_fetch_avatar_filter( $avatar, $user, $size, $default, $alt ) { 480 480 global $pagenow; 481 481 482 482 // Do not filter if inside WordPress options page 483 483 if ( 'options-discussion.php' == $pagenow ) 484 484 return $avatar; 485 485 486 486 // If passed an object, assume $user->user_id 487 487 if ( is_object( $user ) ) 488 488 $id = $user->user_id; … … 522 522 } 523 523 524 524 function bp_core_check_avatar_type($file) { 525 if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/ ', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/', $file['file']['name'] ) )525 if ( ( !empty( $file['file']['type'] ) && !preg_match('/(jpe?g|gif|png)$/i', $file['file']['type'] ) ) || !preg_match( '/(jpe?g|gif|png)$/i', $file['file']['name'] ) ) 526 526 return false; 527 527 528 528 return true;