WordPress.org

Make WordPress Core

Ticket #3503: comment.php.diff

File comment.php.diff, 999 bytes (added by mm6, 11 years ago)

patch against latest trunk to update comment_date_gmt column when updating a comment

  • wp-includes/comment.php

     
    460460
    461461        $comment_content = apply_filters('comment_save_pre', $comment_content);
    462462
     463        $comment_date_gmt = gmdate('Y-m-d H:i:s', strtotime($comment_date) );
     464
    463465        $result = $wpdb->query(
    464466                "UPDATE $wpdb->comments SET
    465467                        comment_content      = '$comment_content',
     
    467469                        comment_author_email = '$comment_author_email',
    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
    473476        $rval = $wpdb->rows_affected;
     
    810813                $client->query('weblogUpdates.ping', get_option('blogname'), $home);
    811814}
    812815
    813 ?>
    814  No newline at end of file
     816?>