Ticket #4597: 4597.diff
File 4597.diff, 1023 bytes (added by , 12 years ago) |
---|
-
bp-messages/bp-messages-classes.php
365 365 if ( !$wpdb->query( $wpdb->prepare( "INSERT INTO {$bp->messages->table_name_messages} ( thread_id, sender_id, subject, message, date_sent ) VALUES ( %d, %d, %s, %s, %s )", $this->thread_id, $this->sender_id, $this->subject, $this->message, $this->date_sent ) ) ) 366 366 return false; 367 367 368 $this->id = $wpdb->insert_id; 369 368 370 $recipient_ids = array(); 369 371 370 372 if ( $new_thread ) { … … 382 384 $wpdb->query( $wpdb->prepare( "UPDATE {$bp->messages->table_name_recipients} SET unread_count = unread_count + 1, sender_only = 0, is_deleted = 0 WHERE thread_id = %d AND user_id != %d", $this->thread_id, $this->sender_id ) ); 383 385 } 384 386 385 $this->id = $wpdb->insert_id;386 387 messages_remove_callback_values(); 387 388 388 389 do_action_ref_array( 'messages_message_after_save', array( &$this ) );