Changeset 1714
- Timestamp:
- 08/27/2009 05:43:08 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-avatars.php
r1712 r1714 200 200 201 201 $bp->avatar_admin->original = wp_handle_upload( $file['file'], array( 'action'=> 'bp_avatar_upload' ) ); 202 202 203 203 // Move the file to the correct upload location. 204 204 if ( !empty( $bp->avatar_admin->original['error'] ) ) { -
trunk/bp-core/bp-core-catchuri.php
r1677 r1714 101 101 $bp_uri = array_merge( array(), $bp_uri ); 102 102 $bp_unfiltered_uri = $bp_uri; 103 103 104 104 /* Catch a member page and set the current member ID */ 105 105 if ( $bp_uri[0] == BP_MEMBERS_SLUG || in_array( 'wp-load.php', $bp_uri ) ) { 106 106 $is_member_page = true; 107 107 $is_root_component = true; 108 108 109 109 // We are within a member page, set up user id globals 110 110 $displayed_user_id = bp_core_get_displayed_userid( $bp_uri[1] ); … … 175 175 176 176 $bp_path = $pages; 177 177 178 178 if ( !bp_is_blog_page() ) { 179 179 remove_action( 'template_redirect', 'redirect_canonical' ); … … 245 245 } 246 246 } 247 add_action( 'wp', 'bp_core_catch_no_access' , 10);247 add_action( 'wp', 'bp_core_catch_no_access' ); 248 248 249 249 /** -
trunk/bp-core/bp-core-signup.php
r1682 r1714 138 138 139 139 $bp->avatar_admin->step = 'upload-image'; 140 140 141 141 /* If user has uploaded a new avatar */ 142 142 if ( !empty( $_FILES ) ) { … … 144 144 /* Check the nonce */ 145 145 check_admin_referer( 'bp_avatar_upload' ); 146 147 $bp->signup->step = 'completed-confirmation'; 146 148 147 149 /* Get the activation key */ … … 152 154 $bp->signup->avatar_dir = wp_hash( $bp->signup->key ); 153 155 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' ) ) { 159 158 $bp->avatar_admin->step = 'crop-image'; 160 159 161 160 /* Make sure we include the jQuery jCrop file for image cropping */ 162 161 add_action( 'wp', 'bp_core_add_jquery_cropper' ); 163 } 162 } 164 163 } 165 164 } … … 191 190 return false; 192 191 193 $path 192 $path = get_blog_option( BP_ROOT_BLOG, 'upload_path' ); 194 193 $newdir = path_join( ABSPATH, $path ); 195 194 $newdir .= '/avatars/signups/' . $bp->signup->avatar_dir; -
trunk/bp-core/bp-core-templatetags.php
r1655 r1714 828 828 $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir; 829 829 830 if ( empty( $signup_avatar_dir ) ) {831 if ( empty( $bp->grav_default ) ) {830 if ( empty( $signup_avatar_dir ) ) { 831 if ( empty( $bp->grav_default->user ) ) { 832 832 $default_grav = 'wavatar'; 833 } else if ( 'mystery' == $bp->grav_default ) {833 } else if ( 'mystery' == $bp->grav_default->user ) { 834 834 $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg'; 835 835 } else { 836 $default_grav = $bp->grav_default ;836 $default_grav = $bp->grav_default->user; 837 837 } 838 838 839 839 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' ); 840 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ) . '" width="' . $size . ' height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';840 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />'; 841 841 } else { 842 842 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) ); -
trunk/bp-groups.php
r1710 r1714 1 1 <?php 2 2 3 define ( 'BP_GROUPS_DB_VERSION', '171 0' );3 define ( 'BP_GROUPS_DB_VERSION', '1711' ); 4 4 5 5 /* Define the slug for the component */ … … 32 32 enable_wire tinyint(1) NOT NULL DEFAULT '1', 33 33 enable_forum tinyint(1) NOT NULL DEFAULT '1', 34 date_created datetime NOT NULL 34 date_created datetime NOT NULL, 35 35 KEY creator_id (creator_id), 36 36 KEY status (status) … … 533 533 add_action( 'wp', 'bp_core_add_jquery_cropper' ); 534 534 } 535 //var_dump($_COOKIE);536 535 } 537 536 -
trunk/bp-xprofile.php
r1693 r1714 1 1 <?php 2 define ( 'BP_XPROFILE_DB_VERSION', '170 0' );2 define ( 'BP_XPROFILE_DB_VERSION', '1705' ); 3 3 4 4 /* Define the slug for the component */ … … 84 84 85 85 $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_delete86 id, group_id, parent_id, type, name, is_required, can_delete 87 87 ) VALUES ( 88 1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', '', 1, 1, 0, '',1, 088 1, 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', 1, 0 89 89 );"; 90 90 } … … 106 106 107 107 $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, 109 109 item_id bigint(20) NOT NULL, 110 110 user_id bigint(20) NOT NULL, 111 111 content longtext NOT NULL, 112 112 date_posted datetime NOT NULL, 113 PRIMARY KEY id (id),114 113 KEY item_id (item_id), 115 114 KEY user_id (user_id) … … 372 371 373 372 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' ); 375 374 else 376 375 bp_core_add_message( __( 'Your new avatar was uploaded successfully!', 'buddypress' ) );
Note: See TracChangeset
for help on using the changeset viewer.