Opened 13 years ago
Closed 12 years ago
#4906 closed defect (bug) (worksforme)
new message, wrong id...
| Reported by: |  | Owned by: | |
|---|---|---|---|
| Milestone: | 1.6.2 | Priority: | normal | 
| Severity: | normal | Version: | 1.5 | 
| Component: | Messages | Keywords: | |
| Cc: | 
Description
Hello...
I create bugfix bp-messages-classes.php
---
create a new message, but message id is wrong(current code setting thread id!)
---
bp-messages-classes.php
385 remove => $this->id = $wpdb->insert_id;  because this thread_id!!!
367 insert =>                  First insert the message into the messages table
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 ) ) )
return false;
$this->id = $wpdb->insert_id;
sry i little speak english :(
Moving to 1.8.