Skip to:
Content

BuddyPress.org

Changeset 2729


Ignore:
Timestamp:
02/16/2010 04:40:58 AM (17 years ago)
Author:
johnjamesjacoby
Message:

More whitespace and formatting fixes

File:
1 edited

Legend:

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

    r2695 r2729  
    209209
    210210        if ( $av_dir = opendir( $avatar_folder_dir ) ) {
    211             while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
     211                while ( false !== ( $avatar_file = readdir($av_dir) ) ) {
    212212                        if ( ( preg_match( "/-bpfull/", $avatar_file ) || preg_match( "/-bpthumb/", $avatar_file ) ) && '.' != $avatar_file && '..' != $avatar_file )
    213213                                @unlink( $avatar_folder_dir . '/' . $avatar_file );
    214214                }
    215215        }
    216     closedir($av_dir);
     216        closedir($av_dir);
    217217
    218218        @rmdir( $avatar_folder_dir );
     
    230230
    231231        $uploadErrors = array(
    232         0 => __("There is no error, the file uploaded with success", 'buddypress'),
    233         1 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE),
    234         2 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE),
    235         3 => __("The uploaded file was only partially uploaded", 'buddypress'),
    236         4 => __("No file was uploaded", 'buddypress'),
    237         6 => __("Missing a temporary folder", 'buddypress')
     232                0 => __("There is no error, the file uploaded with success", 'buddypress'),
     233                1 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE),
     234                2 => __("Your image was bigger than the maximum allowed file size of: ", 'buddypress') . size_format(BP_AVATAR_ORIGINAL_MAX_FILESIZE),
     235                3 => __("The uploaded file was only partially uploaded", 'buddypress'),
     236                4 => __("No file was uploaded", 'buddypress'),
     237                6 => __("Missing a temporary folder", 'buddypress')
    238238        );
    239239
     
    253253        }
    254254
    255         // Filter the upload location
     255        /* Filter the upload location */
    256256        add_filter( 'upload_dir', $upload_dir_filter, 10, 0 );
    257257
    258258        $bp->avatar_admin->original = wp_handle_upload( $file['file'], array( 'action'=> 'bp_avatar_upload' ) );
    259259
    260         // Move the file to the correct upload location.
     260        /* Move the file to the correct upload location. */
    261261        if ( !empty( $bp->avatar_admin->original['error'] ) ) {
    262262                bp_core_add_message( sprintf( __( 'Upload Failed! Error was: %s', 'buddypress' ), $bp->avatar_admin->original['error'] ), 'error' );
     
    264264        }
    265265
    266         // Resize the image down to something manageable and then delete the original
    267         if ( getimagesize( $bp->avatar_admin->original['file'] ) > BP_AVATAR_ORIGINAL_MAX_WIDTH ) {
     266        /* Resize the image down to something manageable and then delete the original */
     267        if ( getimagesize( $bp->avatar_admin->original['file'] ) > BP_AVATAR_ORIGINAL_MAX_WIDTH )
    268268                $bp->avatar_admin->resized = wp_create_thumbnail( $bp->avatar_admin->original['file'], BP_AVATAR_ORIGINAL_MAX_WIDTH );
    269         }
    270269
    271270        $bp->avatar_admin->image = new stdClass;
    272271
    273         // We only want to handle one image after resize.
     272        /* We only want to handle one image after resize. */
    274273        if ( empty( $bp->avatar_admin->resized ) )
    275274                $bp->avatar_admin->image->dir = $bp->avatar_admin->original['file'];
Note: See TracChangeset for help on using the changeset viewer.