Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/24/2008 10:48:52 AM (17 years ago)
Author:
apeatling
Message:

Fixed bug where blog signup would cause validation errors with missing first and last name.

Fixed bug where avatar images larger than allowed max upload size would not throw an error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-avatars.php

    r394 r432  
    1414define( 'CORE_AVATAR_V2_W', 150 );
    1515define( 'CORE_AVATAR_V2_H', 150 );
     16define( 'CORE_CROPPING_CANVAS_MAX', 450 );
    1617define( 'CORE_MAX_FILE_SIZE', get_site_option('fileupload_maxk') * 1024 );
    1718define( 'CORE_DEFAULT_AVATAR', site_url() . '/wp-content/mu-plugins/bp-xprofile/images/none.gif' );
     
    118119        $uploadErrors = array(
    119120                0 => __("There is no error, the file uploaded with success", 'buddypress'),
    120                 1 => __("The uploaded file exceeds the upload_max_filesize directive in php.ini", 'buddypress'),
    121                 2 => __("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", 'buddypress'),
     121                1 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(CORE_MAX_FILE_SIZE),
     122                2 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(CORE_MAX_FILE_SIZE),
    122123                3 => __("The uploaded file was only partially uploaded", 'buddypress'),
    123124                4 => __("No file was uploaded", 'buddypress'),
     
    235236}
    236237
    237 function bp_core_resize_avatar($file, $size = CORE_CROPPING_CANVAS_MAX) {
     238function bp_core_resize_avatar( $file, $size = false ) {
     239   
     240    if ( !$size )
     241        $size = CORE_CROPPING_CANVAS_MAX;
     242
    238243    $canvas = wp_create_thumbnail( $file, $size );
    239244   
Note: See TracChangeset for help on using the changeset viewer.