Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/29/2008 06:05:10 PM (18 years ago)
Author:
apeatling
Message:

Fixed "Could not create thumbnail" issues.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-signup.php

    r355 r363  
    178178                                        if ( !bp_core_check_avatar_size($_FILES) ) {
    179179                                                $avatar_error = true;
    180                                                 $avatar_size = size_format(1024 * XPROFILE_MAX_FILE_SIZE);
     180                                                $avatar_size = size_format(1024 * CORE_MAX_FILE_SIZE);
    181181                                                $avatar_error_msg = sprintf( __('The file you uploaded is too big. Please upload a file under %d'), $avatar_size);
    182182                                        }
    … …  
    195195                                        if ( !bp_core_check_avatar_dimensions($original) ) {
    196196                                                $avatar_error = true;
    197                                                 $avatar_error_msg = sprintf( __('The image you upload must have dimensions of %d x %d pixels or larger.'), XPROFILE_CROPPING_CANVAS_MAX, XPROFILE_CROPPING_CANVAS_MAX );
    198                                         }
    199                                        
    200                                         if ( !$canvas = bp_core_resize_avatar($original) ) {
    201                                                 $avatar_error = true;
    202                                                 $avatar_error_msg = __('Could not create thumbnail, try another photo.');
    203                                         }
    204                                        
     197                                                $avatar_error_msg = sprintf( __('The image you upload must have dimensions of %d x %d pixels or larger.'), CORE_AVATAR_V2_W, CORE_AVATAR_V2_W );
     198                                        }
     199                                       
     200                                        if ( !$canvas = bp_core_resize_avatar($original) )
     201                                                $canvas = $original;
    205202                                }
    206203                               
Note: See TracChangeset for help on using the changeset viewer.