Skip to:
Content

BuddyPress.org

Changeset 1714 for trunk/bp-xprofile.php


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-xprofile.php

    r1693 r1714  
    11<?php
    2 define ( 'BP_XPROFILE_DB_VERSION', '1700' );
     2define ( 'BP_XPROFILE_DB_VERSION', '1705' );
    33
    44/* Define the slug for the component */
     
    8484   
    8585        $sql[] = "INSERT INTO {$bp->profile->table_name_fields} (
    86                     id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete
     86                    id, group_id, parent_id, type, name, is_required, can_delete
    8787                  ) VALUES (
    88                     1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', '', 1, 1, 0, '', 1, 0
     88                    1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', 1, 0
    8989                  );";
    9090    }
     
    106106
    107107    $sql[] = "CREATE TABLE {$bp->profile->table_name_wire} (
    108                id bigint(20) NOT NULL AUTO_INCREMENT,
     108               id bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    109109               item_id bigint(20) NOT NULL,
    110110               user_id bigint(20) NOT NULL,
    111111               content longtext NOT NULL,
    112112               date_posted datetime NOT NULL,
    113                PRIMARY KEY id (id),
    114113               KEY item_id (item_id),
    115114               KEY user_id (user_id)
     
    372371
    373372        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'] ) ) )
    374             bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ) );
     373            bp_core_add_message( __( 'There was a problem cropping your avatar, please try uploading it again', 'buddypress' ), 'error' );
    375374        else
    376375            bp_core_add_message( __( 'Your new avatar was uploaded successfully!', 'buddypress' ) );
Note: See TracChangeset for help on using the changeset viewer.