Ticket #1670: comment-functions.php.diff
File comment-functions.php.diff, 1.0 KB (added by , 19 years ago) |
---|
-
comment-functions.php
38 38 $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; 39 39 $commentdata['comment_date'] = current_time('mysql'); 40 40 $commentdata['comment_date_gmt'] = current_time('mysql', 1); 41 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 41 42 42 43 $commentdata = wp_filter_comment($commentdata); 43 44 … … 50 51 if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching 51 52 if ( '0' == $commentdata['comment_approved'] ) 52 53 wp_notify_moderator($comment_ID); 53 54 if ( get_settings('comments_notify') && $commentdata['comment_approved'] ) 54 55 $post = &get_post($commentdata['comment_post_ID']); 56 57 if ( get_settings('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] ) 55 58 wp_notify_postauthor($comment_ID, $commentdata['comment_type']); 56 59 } 57 60