Make WordPress Core

Changeset 8004


Ignore:
Timestamp:
05/28/2008 03:37:59 PM (17 years ago)
Author:
ryan
Message:

Fix duplicate comment notifications. Props MtDewVirus. fixes #6892 for trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/comment.php

    r7998 r8004  
    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() );
  • trunk/wp-includes/comment.php

    r7917 r8004  
    735735        case 'approve':
    736736            $query = $wpdb->prepare("UPDATE $wpdb->comments SET comment_approved='1' WHERE comment_ID = %d LIMIT 1", $comment_id);
    737             if ( get_option( 'comments_notify' ) == true )
    738                 wp_notify_postauthor( $comment_id );
     737            if ( get_option('comments_notify') ) {
     738                $comment = get_comment($comment_id);
     739                wp_notify_postauthor($comment_id, $comment->comment_type);
     740            }
    739741            break;
    740742        case 'spam':
Note: See TracChangeset for help on using the changeset viewer.