Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/27/2009 05:43:08 PM (15 years ago)
Author:
apeatling
Message:

Signup avatar upload fixes and DB fixes.

File:
1 edited

Legend:

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

    r1682 r1714  
    138138
    139139    $bp->avatar_admin->step = 'upload-image';
    140    
     140
    141141    /* If user has uploaded a new avatar */
    142142    if ( !empty( $_FILES ) ) {
     
    144144        /* Check the nonce */
    145145        check_admin_referer( 'bp_avatar_upload' );
     146
     147        $bp->signup->step = 'completed-confirmation';
    146148       
    147149        /* Get the activation key */
     
    152154            $bp->signup->avatar_dir = wp_hash( $bp->signup->key );
    153155           
    154             /* Pass the file to the avatar upload handler */
    155             $errors = bp_core_avatar_handle_upload( $_FILES, 'bp_core_signup_avatar_upload_dir' );
    156 
    157             if ( !$errors ) {
    158                 $bp->signup->step = 'completed-confirmation';
     156            /* Pass the file to the avatar upload handler */       
     157            if ( bp_core_avatar_handle_upload( $_FILES, 'bp_core_signup_avatar_upload_dir' ) ) {       
    159158                $bp->avatar_admin->step = 'crop-image';
    160159
    161160                /* Make sure we include the jQuery jCrop file for image cropping */
    162161                add_action( 'wp', 'bp_core_add_jquery_cropper' );
    163             }
     162            }           
    164163        }
    165164    }
     
    191190        return false;
    192191   
    193     $path  = get_blog_option( BP_ROOT_BLOG, 'upload_path' );
     192    $path = get_blog_option( BP_ROOT_BLOG, 'upload_path' );
    194193    $newdir = path_join( ABSPATH, $path );
    195194    $newdir .= '/avatars/signups/' . $bp->signup->avatar_dir;
Note: See TracChangeset for help on using the changeset viewer.