Update comment date gmt when updating comment date. Props mm6. fixes #3503
git-svn-id: http://svn.automattic.com/wordpress/trunk@4705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c45b9c473
commit
7ba967ebd2
|
@ -331,7 +331,7 @@ function wp_insert_comment($commentdata) {
|
||||||
if ( ! isset($comment_date) )
|
if ( ! isset($comment_date) )
|
||||||
$comment_date = current_time('mysql');
|
$comment_date = current_time('mysql');
|
||||||
if ( ! isset($comment_date_gmt) )
|
if ( ! isset($comment_date_gmt) )
|
||||||
$comment_date_gmt = gmdate('Y-m-d H:i:s', strtotime($comment_date) );
|
$comment_date_gmt = get_gmt_from_date($comment_date);
|
||||||
if ( ! isset($comment_parent) )
|
if ( ! isset($comment_parent) )
|
||||||
$comment_parent = 0;
|
$comment_parent = 0;
|
||||||
if ( ! isset($comment_approved) )
|
if ( ! isset($comment_approved) )
|
||||||
|
@ -460,6 +460,8 @@ function wp_update_comment($commentarr) {
|
||||||
|
|
||||||
$comment_content = apply_filters('comment_save_pre', $comment_content);
|
$comment_content = apply_filters('comment_save_pre', $comment_content);
|
||||||
|
|
||||||
|
$comment_date_gmt = get_gmt_from_date($comment_date);
|
||||||
|
|
||||||
$result = $wpdb->query(
|
$result = $wpdb->query(
|
||||||
"UPDATE $wpdb->comments SET
|
"UPDATE $wpdb->comments SET
|
||||||
comment_content = '$comment_content',
|
comment_content = '$comment_content',
|
||||||
|
@ -467,7 +469,8 @@ function wp_update_comment($commentarr) {
|
||||||
comment_author_email = '$comment_author_email',
|
comment_author_email = '$comment_author_email',
|
||||||
comment_approved = '$comment_approved',
|
comment_approved = '$comment_approved',
|
||||||
comment_author_url = '$comment_author_url',
|
comment_author_url = '$comment_author_url',
|
||||||
comment_date = '$comment_date'
|
comment_date = '$comment_date',
|
||||||
|
comment_date_gmt = '$comment_date_gmt'
|
||||||
WHERE comment_ID = $comment_ID" );
|
WHERE comment_ID = $comment_ID" );
|
||||||
|
|
||||||
$rval = $wpdb->rows_affected;
|
$rval = $wpdb->rows_affected;
|
||||||
|
@ -810,4 +813,4 @@ function weblog_ping($server = '', $path = '') {
|
||||||
$client->query('weblogUpdates.ping', get_option('blogname'), $home);
|
$client->query('weblogUpdates.ping', get_option('blogname'), $home);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue