Skip to:
Content

BuddyPress.org

Ticket #992: patch.diff

File patch.diff, 1021 bytes (added by petronic, 15 years ago)
  • bp-xprofile.php

     
    411411                /* Check the nonce */
    412412                check_admin_referer( 'bp_avatar_cropstore' );
    413413
    414                 if ( !bp_core_avatar_handle_crop( array( 'item_id' => $bp->displayed_user->id, 'original_file' => $_POST['image_src'], 'crop_x' => $_POST['x'], 'crop_y' => $_POST['y'], 'crop_w' => $_POST['w'], 'crop_h' => $_POST['h'] ) ) )
     414                if ( !bp_core_avatar_handle_crop( array( 'item_id' => $bp->displayed_user->id, 'original_file' => $_POST['image_src'], 'crop_x' => $_POST['x'], 'crop_y' => $_POST['y'], 'crop_w' => $_POST['w'], 'crop_h' => $_POST['h'] ) ) ) {
    415415                        bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ), 'error' );
    416                 else
     416                }
     417                else {
    417418                        bp_core_add_message( __( 'Your new avatar was uploaded successfully!', 'buddypress' ) );
     419                        do_action( 'xprofile_avatar_uploaded' );
    418420
    419421        }
    420422