Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#1507 closed enhancement (fixed)

Suggestion: distinguish comm/ping/track in moderation email (patch included)

Reported by: dsandler's profile dsandler Owned by: skippy's profile skippy
Milestone: Priority: low
Severity: normal Version: 1.5.1.2
Component: Administration Keywords: bg|squashed
Focuses: Cc:

Description

Summary says it all. It would be nice to know in moderation emails whether a comment came from the web, or from a TB or PB. (Note that the new comment email already makes this distinction, so we'd just be propagating it to the moderation step.)

Thanks. ---dan

--- /home/dsandler/src/wordpress-1.5/wp-includes/pluggable-functions.php        Wed Jun 29 21:51:10 2005
+++ pluggable-functions.php     Tue Jul 12 19:13:11 2005
@@ -242,10 +242,13 @@
        $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
        $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
 
+       $comment_type = $comment->comment_type;
+       if (empty($comment_type)) { $comment_type = "comment"; }
+
        $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
        $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
 
-       $notify_message  = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";
+       $notify_message  = sprintf( __('A new %3$s on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title, $comment_type ) . "\r\n";
        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
        $notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
        $notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . "\r\n";
@@ -266,4 +269,4 @@
 }
 endif;

Attachments (1)

pluggable-functions.patch (447 bytes) - added by skippy 20 years ago.
tweaked patch for 1.6

Download all attachments as: .zip

Change History (6)

@skippy
20 years ago

tweaked patch for 1.6

#1 @skippy
20 years ago

  • Keywords bg|has-patch bg|dev-feedback bg|2nd-opinion added
  • Milestone set to 1.6
  • Owner changed from anonymous to skippy
  • Status changed from new to assigned

#2 @skippy
20 years ago

  • Milestone changed from 1.6 to 1.5.2

#3 @matt
20 years ago

  • Milestone changed from 1.5.2 to 1.6

#4 @masquerade
20 years ago

  • Keywords bg|squashed added; bg|has-patch bg|dev-feedback bg|2nd-opinion removed
  • Resolution set to fixed
  • Status changed from assigned to closed

This is already fixed in 1.6

#5 @(none)
19 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.