Resurrect comment approval notification. Props chmac. fixes #6892 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@7917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-12 16:14:15 +00:00
parent 61881c0e82
commit 359601b720
1 changed files with 2 additions and 0 deletions

View File

@ -734,6 +734,8 @@ function wp_set_comment_status($comment_id, $comment_status) {
break;
case 'approve':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
if ( get_option( 'comments_notify' ) == true )
wp_notify_postauthor( $comment_id );
break;
case 'spam':
$query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='spam' WHERE comment_ID = %d LIMIT 1", $comment_id);