Changeset 8005

Show
Ignore:
Timestamp:
05/28/08 15:42:04 (5 months ago)
Author:
ryan
Message:

Fix duplicate comment notifications. Props MtDewVirus?. fixes #6892 for 2.5

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.5/wp-admin/comment.php

    r7756 r8005  
    194194    wp_set_comment_status( $comment->comment_ID, 'approve' ); 
    195195 
    196     if ( true == get_option('comments_notify') ) 
    197         wp_notify_postauthor( $comment->comment_ID ); 
    198  
    199  
    200196    if ( '' != wp_get_referer() && false == $noredir ) 
    201197        wp_redirect( wp_get_referer() ); 
  • branches/2.5/wp-includes/comment.php

    r7918 r8005  
    727727        case 'approve': 
    728728            $query = "UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID='$comment_id' LIMIT 1"; 
    729             if ( get_option( 'comments_notify' ) == true ) 
    730                 wp_notify_postauthor( $comment_id ); 
     729            if ( get_option('comments_notify') ) { 
     730                $comment = get_comment($comment_id); 
     731                wp_notify_postauthor($comment_id, $comment->comment_type); 
     732            } 
     733 
    731734            break; 
    732735        case 'spam':