Changeset 1032 for trunk/bp-xprofile.php
- Timestamp:
- 02/09/2009 06:52:51 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r1030 r1032 188 188 189 189 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 190 if ( false == ( $wpdb->get_var("SHOW TABLES LIKE '%{$bp->profile->table_name_groups}%'")) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) )190 if ( !$wpdb->get_var("SHOW TABLES LIKE '%{$bp->profile->table_name_groups}%'") || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 191 191 xprofile_install(); 192 192 193 if ( ( function_exists('bp_wire_install') && false ==$wpdb->get_var( "SHOW TABLES LIKE '%{$bp->profile->table_name_wire}%'" ) ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) )193 if ( ( function_exists('bp_wire_install') && !$wpdb->get_var( "SHOW TABLES LIKE '%{$bp->profile->table_name_wire}%'" ) ) || ( get_site_option('bp-xprofile-db-version') < BP_XPROFILE_DB_VERSION ) ) 194 194 xprofile_wire_install(); 195 195 } … … 345 345 function xprofile_action_delete_avatar() { 346 346 global $bp; 347 347 348 348 if ( 'delete-avatar' != $bp->current_action ) 349 return false; 350 351 if ( !check_admin_referer( 'bp_delete_avatar_link' ) ) 349 352 return false; 350 353 … … 370 373 function xprofile_action_new_wire_post() { 371 374 global $bp; 372 375 373 376 if ( $bp->current_component != $bp->wire->slug ) 374 377 return false; … … 376 379 if ( 'post' != $bp->current_action ) 377 380 return false; 378 381 382 /* Check the nonce */ 383 if ( !check_admin_referer( 'bp_wire_post' ) ) 384 return false; 385 379 386 if ( !$wire_post_id = bp_wire_new_post( $bp->displayed_user->id, $_POST['wire-post-textarea'], $bp->profile->slug, false, $bp->profile->table_name_wire ) ) { 380 387 bp_core_add_message( __('Wire message could not be posted. Please try again.', 'buddypress'), 'error' ); … … 625 632 // Loop through each field in the group 626 633 for ( $j = 0; $j < count($group->fields); $j++ ) { 627 634 628 635 // Create a new field object for this field based on the field ID. 629 636 $field = new BP_XProfile_Field( $group->fields[$j]->id ); … … 634 641 // If the user has submitted the form - validate and save the new value for this field 635 642 if ( isset($_GET['mode']) && 'save' == $_GET['mode'] ) { 643 644 /* Check the nonce */ 645 if ( !check_admin_referer( 'bp_xprofile_edit' ) ) 646 return false; 636 647 637 648 // If the current field is a datebox, we need to append '_day' to the end of the field name … … 719 730 <input type="submit" name="save" id="save" value="'.__('Save Changes »', 'buddypress').'" /> 720 731 </p>'; 732 733 $list_html .= wp_nonce_field( 'bp_xprofile_edit' ); 721 734 722 735 // If the user submitted the form to save new values, and there were errors, make sure we display them.
Note: See TracChangeset
for help on using the changeset viewer.