[buddypress-trac] [BuddyPress] #4906: new message, wrong id...

buddypress-trac noreply at wordpress.org
Mon Apr 1 16:19:37 UTC 2013


#4906: new message, wrong id...
--------------------------+-----------------------------
 Reporter:  eggproject    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Messaging     |    Version:
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 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 :(

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4906>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list