Make WordPress Core

Changeset 4705


Ignore:
Timestamp:
01/09/2007 08:22:28 AM (20 years ago)
Author:
ryan
Message:

Update comment date gmt when updating comment date. Props mm6. fixes #3503

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r4656 r4705  
    332332                $comment_date = current_time('mysql');
    333333        if ( ! isset($comment_date_gmt) )
    334                 $comment_date_gmt = gmdate('Y-m-d H:i:s', strtotime($comment_date) );
     334                $comment_date_gmt = get_gmt_from_date($comment_date);
    335335        if ( ! isset($comment_parent) )
    336336                $comment_parent = 0;
    … …  
    461461        $comment_content = apply_filters('comment_save_pre', $comment_content);
    462462
     463        $comment_date_gmt = get_gmt_from_date($comment_date);
     464
    463465        $result = $wpdb->query(
    464466                "UPDATE $wpdb->comments SET
    … …  
    468470                        comment_approved     = '$comment_approved',
    469471                        comment_author_url   = '$comment_author_url',
    470                         comment_date         = '$comment_date'
     472                        comment_date         = '$comment_date',
     473                        comment_date_gmt     = '$comment_date_gmt'
    471474                WHERE comment_ID = $comment_ID" );
    472475
Note: See TracChangeset for help on using the changeset viewer.