Changeset 3142 for branches/1.2/bp-messages/bp-messages-classes.php
- Timestamp:
- 07/21/2010 07:33:39 PM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-messages/bp-messages-classes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-messages/bp-messages-classes.php
r2576 r3142 244 244 global $bp; 245 245 246 $this->date_sent = time();246 $this->date_sent = bp_core_current_time(); 247 247 $this->sender_id = $bp->loggedin_user->id; 248 248 … … 289 289 290 290 // First insert the message into the messages table 291 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, FROM_UNIXTIME(%d))", $this->thread_id, $this->sender_id, $this->subject, $this->message, $this->date_sent ) ) )291 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 ) ) ) 292 292 return false; 293 293 … … 388 388 389 389 if ( !$this->id ) { 390 $sql = $wpdb->prepare( "INSERT INTO {$bp->messages->table_name_notices} (subject, message, date_sent, is_active) VALUES (%s, %s, FROM_UNIXTIME(%d), %d)", $this->subject, $this->message, $this->date_sent, $this->is_active );390 $sql = $wpdb->prepare( "INSERT INTO {$bp->messages->table_name_notices} (subject, message, date_sent, is_active) VALUES (%s, %s, %s, %d)", $this->subject, $this->message, $this->date_sent, $this->is_active ); 391 391 } else { 392 392 $sql = $wpdb->prepare( "UPDATE {$bp->messages->table_name_notices} SET subject = %s, message = %s, is_active = %d WHERE id = %d", $this->subject, $this->message, $this->is_active, $this->id );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)