Changeset 1293
- Timestamp:
- 04/01/2009 07:31:34 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r1291 r1293 26 26 require ( 'bp-groups/bp-groups-widgets.php' ); 27 27 require ( 'bp-groups/bp-groups-filters.php' ); 28 29 28 30 29 31 /************************************************************************** … … 132 134 if ( !$no_global ) 133 135 global $bp; 136 137 134 138 135 139 $bp->groups->table_name = $wpdb->base_prefix . 'bp_groups'; … … 1094 1098 1095 1099 $content = apply_filters( 'bp_groups_new_forum_topic_activity', $content, $user_link, $group_link, $forum_topic['topic_id'], $forum_topic['topic_title'], $group_link, $group->name, $post_content ); 1096 1100 1097 1101 return array( 1098 1102 'primary_link' => $group_link, -
trunk/bp-xprofile.php
r1290 r1293 675 675 676 676 // Create a new profile data object for the logged in user based on field ID. 677 $profile_data = new BP_Xprofile_ProfileData( $group->fields[$j]->id );677 $profile_data = new BP_Xprofile_ProfileData( $group->fields[$j]->id, $bp->loggedin_user->id ); 678 678 679 // Delete any data 680 $profile_data->delete(); 679 if ( $profile_data ) { 680 // Delete any data 681 $profile_data->delete(); 682 683 // Also remove any selected profile field data from the $field object. 684 $field->data->value = null; 685 } 681 686 682 // Also remove any selected profile field data from the $field object.683 $field->data->value = null;684 685 687 // If we get to this point then the field validates ok and we have new data. 686 688 } else { -
trunk/bp-xprofile/bp-xprofile-classes.php
r1280 r1293 999 999 1000 1000 $sql = $wpdb->prepare( "SELECT * FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $field_id, $user_id ); 1001 1001 1002 1002 if ( $profiledata = $wpdb->get_row($sql) ) { 1003 1003 1004 $this->id = $profiledata->id; 1004 1005 $this->user_id = $profiledata->user_id; … … 1061 1062 global $wpdb, $bp; 1062 1063 1064 var_dump($wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $this->field_id, $this->user_id )); 1065 1063 1066 if ( !$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_data} WHERE field_id = %d AND user_id = %d", $this->field_id, $this->user_id ) ) ) 1064 1067 return false;
Note: See TracChangeset
for help on using the changeset viewer.