WordPress.org

Make WordPress Core

Ticket #3503: comment-functions.diff

File comment-functions.diff, 778 bytes (added by mm6, 11 years ago)

update comment_date_gmt when editing a comment

  • comment-functions.php

    old new  
    173173
    174174        $comment_content = apply_filters('comment_save_pre', $comment_content);
    175175
     176        $comment_date_gmt = gmdate('Y-m-d H:i:s', strtotime($comment_date) );
     177
    176178        $result = $wpdb->query(
    177179                "UPDATE $wpdb->comments SET
    178180                        comment_content = '$comment_content',
     
    180182                        comment_author_email = '$comment_author_email',
    181183                        comment_approved = '$comment_approved',
    182184                        comment_author_url = '$comment_author_url',
    183                         comment_date = '$comment_date'
     185                        comment_date = '$comment_date',
     186                        comment_date_gmt = '$comment_date_gmt'
    184187                WHERE comment_ID = $comment_ID" );
    185188
    186189        $rval = $wpdb->rows_affected;