Make WordPress Core

Ticket #1263: bug1263_pluggable-functions.php

File bug1263_pluggable-functions.php, 728 bytes (added by coffee2code, 19 years ago)
Line 
1Index: wp-includes/pluggable-functions.php
2===================================================================
3--- wp-includes/pluggable-functions.php (revision 2552)
4+++ wp-includes/pluggable-functions.php (working copy)
5@@ -176,6 +176,9 @@
6        $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
7 
8        if ('' == $user->user_email) return false; // If there's no email to send the comment to
9+
10+       // Don't notify admin or post_author about their own comment
11+       if ( $post->post_author == $user->ID || $user->user_level >= 9 ) return false;
12 
13        $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
14 
15@@ -266,4 +269,4 @@
16 }
17 endif;
18 
19-?>
20\ No newline at end of file
21+?>